Opening the book…
A physical quantity is a number times a unit, and the unit is not decoration: it encodes which measurement procedure produced the number. Because equations describe relationships in the world, both sides must refer to the same kind of thing, so units must match term by term. This is why dimensional consistency is a hard constraint, not a convention: adding a length to a time is not merely wrong notation, it is a claim about nature that cannot be true.
Carry units through every line of algebra as if they were factors, cancelling and combining them alongside the numbers. Before trusting a result, check that both sides reduce to the same dimensions; a mismatch localizes your error to the step where it appeared. Units also convert for free: writing meters as (miles)(1609 m/mile) turns conversion into multiplication by one. When a formula's units come out right, you have a real, independent check on it.
Claim: distance d = ½ a t (a = accel, t = time)
Check dimensions of the right side:
[a][t] = (m/s²)(s) = m/s
But d must be in meters, not m/s.
The units don't match -> the formula is wrong.
Correct form d = ½ a t² gives (m/s²)(s²) = m. OK.Dimensional analysis cannot fix dimensionless factors: it will not tell you whether a ½ or a 2π belongs. Transcendental arguments (in sin, exp, log) and dimensionless groups like the Reynolds number are pure numbers by construction, and some engineering formulas hide units inside their constants.