Not at all convinced it's a feature. More like an unfortunate side-effect of tradition.
Not at all convinced it's a feature. More like an unfortunate side-effect of tradition.
But mathematics notation needs to be extremely succinct because the notation is not just for reading. When you're working something out you often need to write pages and pages of formulae and diagrams by hand. So using a notation more verbose than absolutely necessary would be unnecessarily painful.
Programming is different because you can use a text editor with copy, paste, autocomplete etc. But I imagine that if I wasn't allowed to use any of those then my variable names would shrink down to one letter when I was programming too.
Also, I think that making formulas smaller makes it easier for the eye to see the whole formula together. This makes it easier to quickly understand the meaning of the formula, at least once you've got used to the notation for that particular area of mathematics.
Not only this, but the notation itself is often intentionally used as a particular abstraction to aid intuition, see bsilvereagle's example of Einstein notation below as a great example. This makes things easier to reason about with our human brains even when dealing with very complex ideas.
The abstraction is usually leaky, however, and some notation that aids intuition in one way often makes some other interpretation horribly verbose and unintuitive. Hence the need for more than one notation for the same situation.
All of which isn't to excuse the many historical accidents that haven't been winnowed out by our predecessors. That's often a cultural problem, however, and while some of it can be realistically fixed by teaching the same way we teach good grammar, some of it is as hopeless to rail against as asking to fix every irregular conjugation in the english language. Good luck with that, honestly.
It seems like coming up with a format that at least allows definitions and usages to be hyperlinked might be pretty nice, instead of a format whose primary benefit is looking pretty when you print it on paper.
Poor mathematical writing is pretty rampant, but that's partly due to the fact that it's not taught well and there's definitely some cultural biases towards jargon. I don't think that negates the fact that even within a typewritten document a human needs to read and understand what's going on, so often terseness is desired, as long as the reader understands the notation enabling it.
So, from the outside, it seems like there are big problems with communication in the mathematics community, and it's simply accepted that it has to be that way because math is hard.
Yes, a lot of mathematical papers are incomprehensible to others in the field. But it's not just because of notation. You wouldn't ask a content marketer who is great at A/B testing to deal with tweaking something in the linux kernel because it's all "computers".
When I first started in my adult adventure in math (never doing well with it academically, I started on pre-calc with Khan Academy about a year and a half ago; I'm now working through multivariable calculus on MIT OCW), I used scratch mode in emacs because hey, I'm right there on the computer.
I gave up and started using graph paper as my scratch pretty quickly :)
I can't imagine trying to actually _do_ math with something "descriptive" like LaTeX.
Math, from what I've come to realize, is less about describing how to compute something and more about describing something in such a way that it can be manipulated in order to reveal something new.
And that's why the obtuse iconography is popular in math, and why the obtuse iconography of APL never became truly mainstream in programming.
But we don't do this. We use abstractions. Why doesn't the mathematician? (And you'll say of course they do). In which case we go back to the original question of why dense notation?
This has always bugged me. Andrew Ng's notation for machine learning sometimes uses superscripts as indices, and sometimes as exponents. In the same formula.
Years ago, when I was working on a physics engine for animation, I was struggling through a 2-volume treatise on nonlinear differential equations. One formula in Volume 2 had a symbol I didn't understand, and couldn't find in the text. I eventually found it defined in the first volume, about 500 pages back.
Steven Wolfram was annoyed by that, and he created Mathematica partly to define an unambiguous notation for much of mathematics.
This is a fixable problem. By now we should have programs which read mathematical papers and textbooks, and check that all symbols are defined and unambiguous. There would be style sheets for different branches of mathematics. When reading a paper processed through such a system, you would be able to see the expanded, unambiguous form of a formula, and the definitions of all the standard operators and symbols. This might not be possible for truly cutting-edge mathematics where the conventions haven't settled yet, but that's a small fraction of what's published.
I've never read Ng's work, but typically upper and lower indices is a sign of a summation. It's known as "Einstein Summation Notation". At first glance it seems obtuse, but when you start doing covariant/contravariant derivatives on tensors, the notation makes things much easier.
http://mathworld.wolfram.com/EinsteinSummation.html
Anyway that doesn't invalidate the point that mathematics often has highly ambiguous and hand-wavy notation, whereas programming doesn't.
It has always been very clear for me, and I'm not sure what could be improved. I'd think any attempt to make it less ambiguous or more expressive would eventually devolve in something very similar to what we have now, because of our compulsion to simplify repeated tasks (eg Einstein notation, bra-ket etc..)
A few things that spring to mind:
dx/dy notation, and especially manipulating it like it's a real fraction.
Implicit multiplication, which forces use of single character variable names, which forces use of weird fonts and greek letters.
Writing sin^2(x) for (sin(x))^2
Writing sin^-1(x) for arcsin(x) (especially bad because it conflicts with sin^2(x))
The base for log(x) is ambiguous.
Writing |x| for abs(x) (abs() is obviously a function, it shouldn't have special notation)
Calling abs "modulus"
And the names "imaginary number" and "complex number" seem almost deliberately designed to intimidate outsiders. IMO they should be called "oscillating numbers" and "rotating numbers".
And like nearly every piece of mathematics notation, this one is overloaded: https://en.wikipedia.org/wiki/Determinant
are you serious?
In fact, the reason they're called "imaginary numbers" makes perfect sense if you were a mathematician 500 years ago - one method of solving cubic equation manipulated the square root of negative numbers in intermediate steps, which of course doesn't make sense, but by the final step these square roots canceled out and the final answer was correct. So they named them "imaginary numbers" to kind of tell people "don't worry whether this makes sense, it's only used in an intermediate step, they're not real numbers". So, naming a concept after its most common use is exactly what got us into this situation!
In addition to the modelling-rotation and solving-cubics aspect of complex numbers, last year I used them in a factoring-things context in a number theory class, for example to prove https://en.wikipedia.org/wiki/Proofs_of_Fermat%27s_theorem_o... (read the "Dedekind's Proof" section).
Both of those are because the absolute value of a number is the norm of the one-dimensional space.
https://en.wikipedia.org/wiki/Norm_%28mathematics%29
It allows you to think about |x| when x is a vector (or even other kinds of objects!) rather than just a real number. This kind of generalization can be a really powerful thing about mathematics, making existing insights more broadly applicable.
For all that I know, the only reason to write "|x|" instead of "norm(x)" or "length(x)" is because brevity and because it is a well accepted notation.
Edit: wrong post.
I can honestly say though every single one of those ambiguities I had an issue with in the past. This post reignited latent of ire of mine which I haven't experienced since 16. Denotational semantics are important!
See also Wikipedia on that subject (https://en.wikipedia.org/wiki/Logarithm):
>The logarithm to base 10 (that is b = 10) is called the common logarithm and has many applications in science and engineering. The natural logarithm has the number e (≈ 2.718) as its base; its use is widespread in mathematics and physics, because of its simpler derivative. The binary logarithm uses base 2 (that is b = 2) and is commonly used in computer science.
In higher mathematics, f^-1 does not mean the inverse of a function, unless that function is injective. Most people are aware of that at that point, but it's still a mental hurdle you have to unlearn and can lead to dangerous composition errors. (Edit: since I can't respond to you, poster below me, I mean the latter of course)
Historically, in yore days of sextants, slide rules and log tables, engineers could "lift" multiplication into addition with said log tables which were of convention base 10. For anyone who wasn't a peer in the Royal Society or a professor, that's how complicated math calculations were performed. Banks balanced books and calculated interest payments via tables like this, and the precision of your log tables had a mantissa (the original floating point error, heh).
Do you mean that it has a different meaning for a non-injective function, or that it's undefined for a non-injective function because the non-injective function does not have an inverse?
To the experienced eye, all these usages overlap in subtle ways, so that it all feels reasonable and even justified. But to newcomers, I think the notation just feels like a complete mess.
But I don't think Unix commands are a particularly great example for your side. They are nice for interactive work but terrible for maintenance. Nobody wants to read a thousand-line shell script.
Maths notation has very many problems, most of which stem from the fact that its syntax isn't formally specified. I have no idea why would mathematicians want to continue using this informally specified, ambiguous notation when there are alternatives.
There is no saving maths notation now. It will die out and it will be replaced with a machine-friendly notation because benefits are too huge to ignore in the long run. Meanwhile, mathematicians will throw tantrums in defence of their notation, like all single-language users did throughout the history when their language was being replaced with something else. I wonder, how do math polyglots - the ones who know both normal maths notation and alternatives (like Mathematica and programming languages) - feel about this.
IME verbose notation makes it easier to "type check" an equation or expression, but checking a proof is much more involved than that.
And while you're obviously right that syntactic issues constitute just a minor part of work (at least after you're fluent in a language), the time you spend on them does add up in the long run. Not to mention such issues increase the barrier to entry for the new users unnecessarily...
Yeah, mathematicians are often ambiguous out of laziness, because they have no incentive to make it terse+unambiguous, and making it terse+unambiguous takes more effort than making it terse.
Also sometimes you cannot get maximal terseness and unambiguity at the same time. For example if f is a function of 2 real variables, you fix the first to be x_0 and take the derivative with respect to the second, I would write this as f'(x_0, y), but I'm sure you agree that this is ambiguous to some people.
I'm just happy it's not true for Computer Science and programming. Whatever you want to say about a social side of programming, there's no denying it that outsiders and beginners are warmly welcomed in the community. We create and provide for free tutorials and guides for beginners, we design languages to be as easy for people to understand as possible (we don't exactly know what makes languages easy to understand, but we at least try!), we create tools for visualisation and summarizing code, and so on.
Similar activities seem to be unpopular with mathematicians. I can't help but feel mathematicians are just a bunch of elitist pricks, who know they are on their way out and who try to build artificial barriers for entry into their field to make themselves needed for a bit longer. It's actually natural, most people will fight to retain their status (and jobs). It reminds me of "refucktoring", writing convoluted, unreadable code just to make sure nobody, else than you, can work with it. Such programmers are shunned in our community, yet they are heroes in mathematics. Oh well, as an "outsider" it's not my problem.
It's easy to just stick with the traditional notation(s) of every subject, but there could be some cases where an attempt to refactor some notations might be of benefit.
I usually like to criticize the combined use of i and j. Their use in pseudocode for analyzing loops also just aids confusion. I've helped some people by telling them to go through examples and change one of the variables into something more readable, and then it clicks for them.