Units aren’t the primary focus of this post, but to make this accessible to a wider audience, I’ll try to explain them a bit here.
Wikipedia defines a measurement as “the quantification of attributes of an object or event, which can be used to compare with other objects or events” and a quantity as “a property of a material or system that can be quantified by measurement.”
Quantifying basically means assigning a number, but what is that number supposed to mean?
That’s where units come in. Often times, there’s no good way to interpret a simple number as the outcome of a measurement, so a unit, in the broadest sense, is any well-defined way of converting any measurement of a given quantity into a number.
This is all a bit abstract, so let me give you some examples:
The distance of two cities is a great first example for a measurement where you can’t just use a plain number. If I tell you the distance between Paris and Madrid is 10, then you’re left wondering what I mean by that (Or, more likely if you already know a bit about units, you’re asking “10 what?”). By introducing the unit “meter” (m), I can tell you that the distance is about . In general, stating the unit after the number is just a short way to say “I used this well-defined method to convert the actual quantity into a number.”
Money is something where you could, in principle, use a plain number, since many currencies have a lowest unit, but in practice people don’t seem to agree: If someone asks me how much a house costs and I say “100”, they would assume I mean “100 grand“/“100 thousand dollars”, not just “100 dollars” or even “100 cents”. In this way, “grand”, “dollars” and “cents” are all units that can be used to give an amount of US currency a numerical value.
For our third example, let’s use temperature. For Europeans, 32 is a rather high temperature (more so, the further north you ask); For Americans, it’s rather low instead. The point is that there are two different ways of assigning a number to a temperature in common use: Degrees Celsius and Degrees Fahrenheit. By saying or , I can make sure that my measurement is interpreted correctly.
The last two examples gave us another important concept: Unit conversions.
If a unit can be given in terms of another unit (and vice versa),
they are said to have the same dimension. This is not the kind
of “dimension” you might be familiar with (the one in “2D” and “3D“),
but something different and more abstract.
To go back to our examples:
The dimension of a meter can be called “distance”. Other units of this dimension include the centimeter (cm), kilometer (km), and, for our American readers, the inch, foot, yard, furlong, mile, etc.
The dimension of “money” in general is a bit more controversial, I’ll get to that in a moment, but concretely, for the second example, the dimension of “grand”, “dollar” and “cent” can be said to be “US currency”.
The dimension of the third example is “temperature”. Well isn’t that obvious. Like in the first example, the dimension has the same name as an associated quantity. This is probably partly owed to the fact that the distinction between dimensions and quantities is often swept under the rug, but might also just be laziness or a linguistic limitation.
As an additional example, I’d like to add that there are some quantities which can be given as a plain number; Most usually this will be an amount of distinct units, e.g. a quantity like “number of atoms” (and no, this isn’t the same as “amount of substance”, there’s a weird distinction there that I’ll get to in a moment). These quantities and units are called dimensionless Their dimension can also be said to be the number (yes, that might sound weird, it’s a math thing, I’ll also get to that later).
A value like is called a dimensioned value. It always consists of a number and a unit which gives meaning to that number.
Note that two different quantities can have the same dimension, for example “length” and “width” both have the dimension of distance. Now, you might argue that “length” and “width” are really the same quantity, in which case I will add that “torque” and “energy” both have the same dimension as well and that most physicists will be able to tell you that those two are really distinct quantities.
This perfectly leads me to my next point: What quantities and what dimensions there are is subjective. A system of quantities (which is a bit of a misnomer) defines a set of dimensions to work with, but note that it is a definition. Similarly, you can define length and width to be the same. You can even define all quantities with the same dimension to be the same, in which case the two concepts “quantity” and “dimension” collapse into one.
A notorious example of this are several systems of quantities, used
in physics, that are all grouped under the term natural units
(which is also a misnomer since it’s also about dimensions and not just
units).
One possible part of natural units is letting “distance” and “span of
time” be the same dimension, in which case you can define
(the speed of light in a vacuum) to be the plain number
.
Then, a second can be a measure of distance (the distance travelled by
light in a vacuum in a second) and a meter can be a measure of time (the
time it takes for light to travel a meter in a vacuum).
Another example, taken from the International System of
Quantities (ISQ), which is the system of quantities used by most if
not all scientists today, is the dimension amount of
substance.
This could just be a number. In fact, its unit, the mole (mol), is
defined such that
of a substance is equivalent to exactly
molecules of that substance. However, the ISQ insists that these two
things (amount of substance and number of molecules) have different
dimensions. In my opinion, this is a bit weird, but there are two ways
to think about this to make it less so:
Try to separate “substance” from “molecules contained in it”. Essentially, this represents the approximation we all make at large scales, that matter isn’t made of individual particles but rather a single contiguous thing. The distinction between “amount of substance” and “number of molecules” then just reflects that distinction between the macroscopic and the microscopic world.
If you’re willing to relax the interpretation of “amount of
substance” a bit, you can also just define a unit “molecule” as
and treat that as the base unit instead. The dimension “amount of
substance” could then be renamed “molecules” and it’d suddenly make a
lot more sense.
Note that the number of molecules could be a dimensionless
quantity, but giving it a separate dimension is useful for
dimensional analysis (which I’ll get to later).
Another example in the same vein is that of electrical
charge. The commonly used unit for it is the Coulomb (C), but that
was originally defined before we knew about electrons. Modern physics
states that there is an elementary charge and that all
electrical charges that can occur in the world are whole number
multiples of that (ignoring quarks, but those are still charged a whole
number of thirds of that and also never occur on their
own).
So why don’t we use plain numbers to measure charge when there’s a clear
and unambiguous way to do so? Because keeping the distinction is
useful.
Finally, I’d like to convince you of another opinion of mine, which
is that angles are not dimensionless either.
With how there are two commonly used units of angles, it should seem
intuitive to give them their own dimension as well. In fact, angles can
be thought about as measures of rotation, which should seem like enough
of a distinct thing to be given its own dimension at this point.
As I said before, two units of the same dimension can be used interchangably, by converting a value from one to the other. The procedure of conversion depends on both of the units, but let me give some examples again:
The kilometer is defined such that .
Skipping money, the Kelvin (K) is another unit of temperature such that .
As another temperature example, we have the dreaded conversion of Degrees Celsius into Degrees Fahrenheit: .
As an example for a more complicated conversion, define the unit “tg” as the tangent function applied to an angle. For angles between and , this is a one-to-one mapping, so let’s only think about those for now. Then, we have, by definition .
As you can see, there are many possible conversion procedures. In fact, you can define a unit using any such procedure you could ever come up with (given that it’s reversible).
Let’s look more closely at the first example for now.
You can think of the meter as a measuring stick (which it was
for some time in the past) and the value
just says you how often that measuring stick fits inside your given
distance (at least if it is a straight line). Of course,
doesn’t have to be a whole number, but it should be clear how that works
too.
Importantly, the expression
can be thought of as a multiplication,
.
In this way, we can interpret “km” as a variable with the value
,
or, alternatively, “m” as a variable with the value
(It’s important to note that you can choose either one as the “basic”
one and that this choice is arbitrary).
For this reason, I will call the units “m” and “km”
proportional. The general definition would be “any two units of
the same dimension whose conversion is a simple multiplication with a
non-zero constant”.
(Note that this is true for one direction of conversion if and only if
it is true for the other one.)
Note that the conversion equation naturally emerges from the proportionality of the two units:
Can we think of all dimensioned values as products of number and
unit? Not exactly.
Consider the second example and assume we could write both sides as
products of number and unit:
First set
to obtain
,
then multiply by
again to get
which is not at all what we had before.
The problem can already be seen in the previous equation, since not all
terms on the right hand side are proportional to
.
So how do we save this? Simple, really: Just limit with what units a
dimensioned value can be thought of as a product. The procedure is quite
trivial and works one dimension at a time:
Pick any unit you like from a given dimension and decree that
dimensioned values with this unit can be seen as products. Then, all
units (of the same dimension) that convert to/from that unit with a
simple multiplication can have the same property, but no others.
In the case of temperature, it was decided that Kelvin would be the
unit with this “product property”, so (in this system) you cannot write
.
The reason for this has to do with the concept of absolute
temperature: There is a lowest possible temperature in the universe
and it is, by definition,
.
I could talk about this for a bit longer and try to justify it more, but
the extent to which I’ve discussed it here should be enough for my
purposes.
There’s a standard way of forming units proportional to any given units and that is by using metric prefixes. Basically, you add a prefix to a unit’s name, which defines a new unit which is a pre-defined power of 10 times the base unit. You’re not supposed to combine these, instead there is a big list of them, enough to encompass basically every scientifically relevant order of magnitude. You can find the complete list on Wikipedia, but here are the first few:
Prefix (name) |
Prefix (letter) |
Multiplier it represents |
deci- |
d |
0.1 |
centi- |
c |
0.01 |
milli- |
m |
0.001 |
deca- |
da |
10 |
hecto- |
h |
100 |
kilo- |
k |
1000 |
So for example, a millimeter has the symbol “mm” and is equal to and a hectopascal has the symbol “hPa” and is equal to .
The thing about units being like constants is that you can do algebra with them.
First of all, you can divide units of the same dimension, for example
Next comes the fun part: You can create new dimensions out of old
ones by combining them with multiplication or division.
For example, the dimension “area” is given as the product of “distance”
with itself, so a unit of area is
Similarly, you can divide dimensions, for example “speed” is “distance”
divided by “span of time”, a unit of which is
.
The nice thing about this is how it transfers to dimensioned values. If you have a rectangle and measure its width and height , where both and are dimensioned values (both of dimension “distance“), then its area is simply given by Whatever units you measure and in will determine what unit the result will be. For example, if and , then you will get where .
Note that prefixes conventionally apply inside a power, so .
Additionally, you can raise a single unit to any real number power, but that isn’t used very often with non-integers. For example, is a valid unit of dimension “square root of distance”. That dimension seems weird and wrong, but mathematically it works just like any other one. As for interpreting it, that’s left to equations involving it.
To illustrate this, think about the unit . What exactly is the square of time? Time-Area??? As stated, it’s hard to imagine what this could mean. But when divided by, this unit suddenly makes a lot of sense: The unit is a unit of acceleration, describing an acceleration in terms of how much speed (in units of ) is added per second.
Anyway, from the math’s point of view, the previous paragraph wouldn’t have even been necessary. Products, Quotients and powers of units/dimensions are just defined abstractly and we work with them using the usual rules of algebra.
You might notice the abscense of addition and subtraction, and while
you could define the sum or difference of dimensions in the same way, it
isn’t really that useful in practice, so the usual stance is to say that
only dimensioned values of the same dimension can be added or
subtracted.
For those, we just define their sum/difference using distributivity
(after expressing them in the same unit). Using the meter as an example
again:
Again, all of this only works because we said that dimensioned values are a product of a number and a unit. So be careful when working with units like ℃: It doesn’t have any of these properties because “℃” isn’t a free-standing variable, but rather only part of the notation for a dimensioned value, because we had previously defined the Kelvin to be the free-standing variable and the Degree Celsius is a unit of the same dimension as the Kelvin, but not proportional to it.
As an additional note, we can now see why I said that the dimension
of dimensionless values could be said to be 1: Multiplying a
dimensionless number
with a dimensioned value
gives
,
which should have the product of the dimensions of the input, but
actually has the same dimension as the dimensioned input value.
That means that, from a mathematical perspective, the dimension of
dimensionless values is the multiplicative identity for the product of
dimensions, so it is apt to call it “1”.
Another note I’d like to add is that this dimensional Algebra has a
really useful application called dimensional analysis
(“analysis” here using the common meaning, not the one from “real
analysis”).
By only looking at the dimensions of each variable in an equation, we
have a quick way to find some mistakes. For example if I wanted to write
down the Pythagorean Theorem, but forgot a power of 2,
then I would replace all variables (and physical constants, but there
are none here) by their dimensions and see that
Since
,
I find the left hand side to be
and since addition of the same dimension is well-defined, this finally
reduces to
which is false.
Of course, this example is a bit silly. You don’t actually save any
effort by using dimensional analysis here, but it’s good as an example
to explain the process.
As another example, if I accidentally wrote
then I could see that, on the left hand side, I am adding an area to a
volume, which we had previously forbidden.
This is actually the reason that we go as far as to
forbid adding values of different dimensionalities: No part of
physics actually deals with sums of differently dimensioned values, so
if you encounter such a thing, you can be quite sure that it must have
been an error on your part. (Of course, I’ll reiterate that it’s not
mathematically impossible, but rather a very useful
definition that this is illegal.)
Finally, let me say a word on functions.
In math, you usually only work with dimensionless values, so for most
functions (on the real numbers) you need to check that the argument is
dimensionless (which can also be said to be a part of dimensional
analysis).
A particular example I want to point out is the exponential function,
which can be defined as
Note the sum of different powers of
,
which would be illegal if
had any dimension other than
.
The same is true for any power function
.
Monomials like are fine, since they only consist of operations we defined for all dimensioned values, but general polynomials like have the same issue again.
The way to use these with dimensioned values is to divide by a unit first, so for example would work if had dimension “distance”.
The same could be true for trigonometric functions like
and
,
but, as I said before, I think it’s better to define angles as having a
dimension different from 1, so these functions would actually require
their argument to be an angle, and not dimensionless.
(An issue with this is that
only works for dimensionless
,
which turns out to be the value of an angle in radians, but I don’t
think that’s enough to refute my viewpoint.)
After this long and arduous prologue, we’re finally ready to talk
about logarithms (and this part will be laughably short in
comparison).
Or maybe you skipped the previous section, in which case: Welcome
aboard.
You might’ve learned in school that the function has an inverse (at least as long as and ), called the logarithm to the base , , which thus fulfills the equation
We can translate the three power rules into logarithm rules by setting and then applying :
The logarithm rule we’ll be interested in is obtained by taking the equation and applying to both sides: Note that this holds for any (as long as is defined), so you can basically change the base of a logarithm to anything you want.
This allows us to use a “standard” base (usually Euler’s number ) and define , whence This allows us to rewrite the previous equation in the “trivial” form
This is the point I want to get at. Think about meters and kilometers again. We know that , so, for a dimensioned distance , we have
Notice the similarity?
is exactly analogous to
and “km” and “m” correspond to
and
respectively.
But that isn’t all. Note that
is still defined as a logarithm to a specific base. Why should we prefer
one base over another? It’s the same thing as with units of distance:
There’s no preferred unit, so it’s best to treat the dimensioned
quantity abstractly, without giving its value in any concrete unit
(except when calculating).
Thus, I propose to treat logarithms the same. For a positive real number , I define the abstract, dimensioned quantity (with no base). Then, each other positive real number defines a unit , such that the value of in the unit is (Note that you’ll often see without a base used to mean an implied base, most often or 10. This is not what I mean.)
This is particularly natural in information theory, where logarithms are already used in conjunction with units. There, you’ll see logarithms to the base 2 be referred to with the unit “bit(s)” and those to the base with the unit “nat(s)”. This is complete nonsense as practiced currently, however, since these “units” are just reminders what logarithm was used, and not actually units at all (they are equal to ).
Using my new formalism, we can make these into actual units of the dimension “logarithm” by just defining There’s another quantity that works perfectly in my framework, and that’s the bel (B), or its more commonly used brother the decibel (dB). This is just defined as and then as usual.
Using these definitions, we can have the perfectly coherent, properly dimensioned equation
Remember the part on the dimensional analysis of functions, where I
said that
has to have a dimensionless argument.
The same could be said about
.
But what if we don’t do that?
What if we just work with expressions like and see where that leads us?
Well, as a start we should work with units with the product property, so that we can apply logarithm rule (2) to get (Note that I’m still using my dimensioned, base-less logarithm, but you can also apply this concept to logarithms with a base.)
The expression
is something we’re already familiar with: It’s a dimensioned value with
dimension “logarithm”.
Now what about
?
Let’s just say that that also has the dimension “logarithm” so that
we can keep our rule of only adding values of the same dimension.
You might object and say that there should be a new dimension, maybe
call it “logarithm of distance”, but take another look at what we just
derived. When we take the logarithm, the unit itself goes in a
logarithm on its own. This is a single thing for each
dimension.
In fact, using logarithm rule (3), we can see that for the power units , which, I want to emphazise, have a different dimension for each value of , we get
Also, if we take the logarithm of a unit of speed, say , we get
The general picture is that the logarithm lets us see how the dimensional algebra actually defines a vector space structure on the set of dimensions.
When units come into the mix, that vector space gains a basis vector “1”, where the scaling factors go, e.g.
If all of that hasn’t blown your mind yet, let me have one more go.
Consider the unit “dBm”, which is used to describe power
logarithmically.
(There are more such suffixed-decibel units, all defined analogously, so
I’ll just stick to dBm here.)
The usual formula is where is the power in milliwatts and is the logarithmic power, given in dBm as stated.
Now, apply our new framework to the numerical value
given there.
First, expand
into the base-less logarithm to get
Then, expand the quotient
using the logarithm rules to get
Rearrange to get
Now,
is what we actually wanted to express when we defined
above, so why not equate the two? That yields
We now have a definition
of “dBm” as a non-proportional unit, similar to ℃!
(Keep in mind that we shouldn’t think of
as a product, but rather just as notation.)
At this point, I can say that my excitement is immeasurable and my
mind is blown.
I hope that you can say the same too.