Last time, we tried to weigh John and Peter without having a scale on hand. At one point, using a seesaw, we said:
“[now] we know that John weighs more than Peter, but by how much, or how many times more?”
But in the end, we could only answer the question “how many times more does John weigh than Peter?”, not “by how much”.
Why couldn’t we answer “by how much”?
Anyone interested in the official definition of the term “dimension” can read it here. For now, let’s recall our grocery shopping algorithm.
Remember we said that to make the algorithm more universal, we need to define input parameters (variables) for “what to buy,” “where to buy,” and “the available budget”?
And at the end, we briefly mentioned that variables have not only a name but also a data type, which defines the allowed range of values.
For example, in our case, the amount can only be in rubles (or dollars); it cannot be specified in meters or kilograms—meaning it would have a Money data type.
(Note: We won’t discuss “what to buy” and “where to buy” just yet—these variables would likely be sub-lists of larger, predefined lists of products and available stores, which are too complex for our current example).
If we had another variable, say, the maximum distance we can travel from home while searching for groceries, it would have a Distance data type.
Can you compare a variable of type Money with a variable of type Distance?
Obviously not. Variables of different types cannot be compared, added, or subtracted from one another.
Now, back to Peter and John. Let’s look at a simplified diagram of their arrangement on the seesaw: Peter sits on one end, and John on the other.
Let’s denote the distance from Peter’s center to the fulcrum as . And the distance from John’s center to the fulcrum as .
Let’s denote the assumed masses of Peter and John as and respectively.
What does physics tell us? That the number of times John is heavier than Peter is the same number of times Peter must sit farther from the fulcrum than John (if we want to balance them).
Look at the formula in the figure: if you divide one by another , you get a dimensionless quantity as a result—in our case, it’s . This answers the question: how many segments of fit into the segment ? This is not , not (and certainly not ). It’s just !
Similarly, you divide one mass by another and also get a dimensionless quantity.
That’s why we can equate one ratio to the other—their resulting dimensions match, or, jokingly, their “dimensionlessness” 🙂, as is the case here.
Returning to the question posed at the beginning of our previous post: “why can’t we say by how much [more he weighs]?”
How could we? We only have and . Each of these distances has dimension : . If we subtract one from the other, the result has the same dimension.
Note that when I write , I mean the dimension of length—by analogy with the type Length. If you subtract a length from a length, you get a length!
Let’s elaborate on this point a bit more, just in case— is a specific value, for example, . is also a specific value, for example, .
And if we’re talking about dimensions, this formula would look like this:
Because it doesn’t matter if you add lengths or subtract them; you still end up with a length! You will never get —the dimension of mass!
Note: We will denote the dimension of a quantity with and use capital letters for the dimensions themselves: for length and for mass.
You could say that dimensions limit our possibilities, but in reality, dimensions merely reflect our reality.
Most importantly, what makes them useful for us is that we can use them to check that we haven’t made a mistake in our calculations, or in our program, if we talk about variable types.
If at any point while solving a problem you suddenly start subtracting meters from kilograms—it means an error has crept in somewhere!
If in a program at some point you start comparing money and distance—it means there is an error in your program!
This is how dimensions and variable types protect us from errors!
And before we move on to density, here’s a little problem for you.
Food for Thought
What do we need to do to finally be able to state John’s actual mass?
The Answer
We need to turn Peter into a reference standard! Look at the proportion: if we multiply both sides of the equation by , we get . From a dimensional standpoint, this would look like:
If we knew beforehand that Peter weighs , then we could calculate that John weighs .
Vocabulary
-
Dimension: for length, for mass, …
-
Dimensionless quantity
-
Variable data type