Hacker News new | ask | show | jobs
by linkdd 1554 days ago
> In basic middle school math it’s common to multiply different units as a basic conversion mechanism

EDIT: Yes, you multiply the units `2m * 2s` : you first multiply the units to get: `m.s`. This is what I say: you convert everything to the same units before doing the calculations.

> Multiplying by the same unit is semantically equivalent to “x times 1 is identity(x)”

This is wrong.

1kg * 1kg = 1kg² period.

What you're saying is `2kg * 1 = 2kg`, which is right, because `1` is a scalar while `2kg` is a quantity. This is completely different than multiplying 2 quantities.

> It would not imply I’m multiplying the units, but rather the scalar value of the unit.

That's where you're wrong. When doing arithmetic on quantities, you have 2 equations:

  x = 2kg * 4s
  unit(x) = kg * s = kg.s
  scalar(x) = 2 * 4 = 8
  x = 8 kg.s
Or

  x = 5m / 2s
  x = (5/2) m/s
  x = 2.5 m/s
There is a meaning to units and the operation you do with them. `5m / 2s` is 5 meters in 2 seconds, which is the speed `2.5 m/s`.

`2m + 1s` has no meaning, therefore you can't do anything with the scalar values, and the result remains `2m + 1s`, not `3 (m+s)`.