Hacker News new | ask | show | jobs
by ianhorn 2157 days ago
If your job consisted of calculating with sequences of changes of programs, with no copy paste available, you'd probably feel differently. For example, a fairly roundabout derivation of a change of base for logarithms (pretending we forget log(a^x) = x log(a) for arbitrary base):

We're trying to derive that a^x = b^(x * log_b(a)).

Or in verbose descriptive terms, oldBase `exponentiate` oldExponent = newBase `exponentiate` ( oldExponent `multiply` inverseExponentiationInNewBase (oldBase) ).

We could maybe argue about the verbosity and clarity of each statement, but I think math's notation shines when you compare derivations instead of statements:

      a^x
    = b^( log_b(a^x)       )
    = b^(    ln(a^x)/ln(b) )
    = b^(  x * ln(a)/ln(b) )
    = b^(  x * log_b(a)    )
or with descriptive names (apologies to readers on mobile):

      oldBase `exponentiate` oldExponent
    = newBase `exponentiate` ( inverseExponentiationInNewBase(oldBase `exponentiate` oldExponent)                                                )
    = newBase `exponentiate` (   inverseNaturalExponentiation(oldBase `exponentiate` oldExponent) `divide` inverseNaturalExponentiation(newBase) )
    = newBase `exponentiate` ( oldExponent  `multiply`  inverseNaturalExponentiation   (oldBase)  `divide` inverseNaturalExponentiation(newBase) )
    = newBase `exponentiate` ( oldExponent  `multiply`  inverseExponentiationInNewBase (oldBase)                                                 )
If I were doing it by hand, I know I'd screw it up with long stuff to copy. Remember accidentally dropping negative signs in school? Hell, I'm still not really sure I got the second version right. By hand, I'd also get super frustrated and impatient writing sooo much.

This is a ridiculous over the top example, since I'm avoiding using everyday symbols like * and / and ^ and log, but for working mathematicians and applied mathematicians, their notation is just as familiar to them and I'm sure it'd be equally annoying to write out descriptively as it is for us to write out basic math symbols descriptively.

Programming notations are to be written and read. Math notation is to be manipulated.

1 comments

Every domain — every language — has its basic jargon, and algebra is no exception. I’m not suggesting that mathematicians simply replace every symbol with a word that hints at meaning; that’s too literal an interpretation of what I wrote. “exponentiate” is no more descriptive than “^”.

But there are alternative ways of describing that derivation that are not as symbol-manipulation heavy; you would certainly not communicate this proof in words to another mathematician — or to a non-mathematician — by simply reading your derivation (or your alternate, verbose derivation) symbol by symbol. Instead you would more likely rely on the meanings of the symbols.

Even in your verbose derivation, however, it’s worth noting that your new names capture the fact that b^x and log_b(x) are inverses, a key piece that someone unfamiliar with logarithms and their relationship to exponentiation now has a hope to understand.

I think most people who wanted to communicate this proof in person would say 'let's find a whiteboard, or do you have some paper'? And then proceed to write down the first version of the proof.

Because it is better communicated in notation than in words.