## I hate math notation!

Please compose all posts in Emacs.

Moderators: phlip, Moderators General, Prelates

HarvesteR
Posts: 65
Joined: Mon May 10, 2010 1:13 pm UTC

### I hate math notation!

There I said it. (Don't know if this is the proper fora for this thread, but it seemed like fuel for flame, so I thought it'd go best here)

So where was I... oh right, I hate math notation!

The usual form of writing formulas and equations is very cryptic and hard to understand for the non initiated... All those greek letters and the usual jargon that accompanies it makes for very convoluted reading.

Ok, now, before everyone starts pointing out my mathematical ignorance, let me say this:

I'm not bashing the way math is written just for the sake of doing so... I just want to say that there are other ways of writing math that are much easier to read... namely, pseudo code notation.

Why does a division operation need to look so vastly different from all other operators? Why can't it be a slash, as used in pseudo code?
Why is it alright to completely omit the multiplication operator? No compiler in it's right mind would let you get away with that.
Why do mathematicians need to use single letter variables? From a programmer's standpoint, that is terrible coding style.

For me, it is much much easier to read and understand this:

Code: Select all

      deg = rad * 180 / PI;      or this:      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;

than this:
[imath]deg = rad \cdot {180 \over \pi}[/imath]

or this:
[imath]{-b + \sqrt{b^2 - 4ac} \over 2a}[/imath]

Ok, rant over... now let me make my excuses:

I know there must be a terribly good reason for this, and that most will argue that I should just learn to read/write math and all that... That is not the point of this thread.

What I mean is that math is downright scary for most students (and most people) because it is normally presented in a way that makes a terrible first impression.
When I was a kid I didn't even bother trying to make sense of it... I just shied away from it because it seemed incomprehensible... now I wish I had made a bigger effort, but I reckon at the time none of it seemed to matter (one could also accuse grade school teachers of not generating enough interest, but let's not get into that).

Even now, my first instinct when I encounter some formula written like that is just to skim over it...
I wonder if math as a school subject wouldn't have much greater acceptance if it was presented in a way that was easier to grasp at first contact.

Am I alone thinking this? Or does anyone else agree (or at least understands where I'm coming from)?

Ok, I'm done now... flame away.

Cheers
The next sentence is the truth. - The previous sentence is a lie.

masher
Posts: 821
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

### Re: I hate math notation!

HarvesteR wrote:Why does a division operation need to look so vastly different from all other operators? Why can't it be a slash, as used in pseudo code?

Which division operator? are you talking about the horizontal line? That is a formalised slash (/). Are you talking about ÷? It's just a convention. You can make the same argument about psuedocode; why does "/" represent division? Why can't I write HYPOTENUSE IS GIVEN BY SQUARE ROOT OF THE SUM OF SIDE_ONE MULTIPLIED BY SIDE_ONE AND SIDE_TWO MULTIPLIED BY SIDE_TWO? (Did I just reinvent COBOL?)

At some point in time, you're going to have to make a call on what you can turn into a symbol and what form that symbol takes.

HarvesteR wrote:Why is it alright to completely omit the multiplication operator? No compiler in it's right mind would let you get away with that.

Why not?

I use a scripting language that supposes that two variables given together in an equation that are separated by a space are being multiplied.

ie the two lines below are equivalent

Code: Select all

a = b ca = b * c

It's not that hard to say a "missing" operator is the same as a multiplication.

What about this:

Code: Select all

"string" + 1

I'm pretty sure it's valid javascript. How can I add a string to an integer?

HarvesteR wrote:Why do mathematicians need to use single letter variables? From a programmer's standpoint, that is terrible coding style.

Single letter variables can also have convention defining their use ([imath]\theta[/imath] is usually an angle) and can also be defined in figures and such.

HarvesteR wrote:For me, it is much much easier to read and understand this:

Code: Select all

      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;

or this:
[imath]{-b + \sqrt{b^2 - 4ac} \over 2a}[/imath]

No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2a}}[/imath] or does it mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2}}a[/imath]

They will give very different results.

Thesh
Made to Fuck Dinosaurs
Posts: 6598
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

### Re: I hate math notation!

masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2a}}[/imath] or does it mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2}}a[/imath]

They will give very different results.

That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

[imath](-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a[/imath]

The equation you are looking for is this:

[imath]x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}[/imath]

Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.
Summum ius, summa iniuria.

masher
Posts: 821
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

### Re: I hate math notation!

Thesh wrote:
masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2a}}[/imath] or does it mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2}}a[/imath]

They will give very different results.

That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

[imath](-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a[/imath]

The equation you are looking for is this:

[imath]x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}[/imath]

Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.

Are you chastising me or the OP? Relying on order of operations to differentiate between multiplication and division isn't that good a practice...

Thesh
Made to Fuck Dinosaurs
Posts: 6598
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

### Re: I hate math notation!

First part you, second part OP. Good practice or not, it's not accurate to say it's ambiguous.
Summum ius, summa iniuria.

HarvesteR
Posts: 65
Joined: Mon May 10, 2010 1:13 pm UTC

### Re: I hate math notation!

masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2a}}[/imath] or does it mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2}}a[/imath]

They will give very different results.

Yeah, I see my mistake there, sorry, it should have been

(-b + sqrt(b^2 - 4*(a*c))) / (2*a)

I like the parentheses, even if they are redundant, it makes for unambiguous operation precedence... I've become quite used to matching them by eye.

And no, I wasn't really looking for that particular equation... it was just an example, from which I removed the plus-minus sign for simplicity.

About the division operator, I do mean the \over sign. Personally I think it makes everything unnecessarily convoluted. I'd much rather read the entire equation on a single line.

About the multiplication thing, 'why not?' isn't really the straight answer I was looking for... I really want to know why at some point mathematicians decided that it was ok to omit it. It could just as well have been any other operation... why multiplication in particular?

And about the single letter variables, I know many have an use attached to them, as your angle example, and that's based on convention... On the other hand, calling your variable 'angle' would produce the same effect, with much more readability.

What I really was looking for from this post was some kind of explanation of WHY math is written the way it is... maybe there is a good logical reason, maybe it's like that because just because it's been like that for centuries... I really don't know... I was hoping to learn something from this.

Cheers
The next sentence is the truth. - The previous sentence is a lie.

Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

### Re: I hate math notation!

HarvesteR wrote:
masher wrote:What I really was looking for from this post was some kind of explanation of WHY math is written the way it is... maybe there is a good logical reason, maybe it's like that because just because it's been like that for centuries... I really don't know... I was hoping to learn something from this.

I know that if I'm working with an angle (or multiple angles) I sure as hell don't want to write (angle) or (angle1) every time I want to refer to that. That would make some of the really messy equations even messier and it would take A LOT longer to write. The convention of using theta to represent an angle makes life a lot easier in that case. Also it makes it a lot easier if by convention variables are a single letter/symbol because then we can use that other convention of omitting the multiplication sign every time. Why multiplication? Because we work with it a lot

Really, it just makes life easier and if you are working with it enough it makes it faster to read and write.

Also I happen to much prefer the \over \frac version of fractions. It makes it a lot easier (in my mind) to decipher which part is the numerator and which is the denominator and it makes it a lot easier to work with manipulating things. It's easier (to me) to see what cancels (if anything). If I'm multiplying a bunch of these fractions together I can just connect the horizontal bars and it's the same thing. If I were to use your notation it would require quite a bit of rearrangement. Typically notations and conventions come into play because they make our lives easier.
double epsilon = -.0000001;

RebeccaRGB
Posts: 336
Joined: Sat Mar 06, 2010 7:36 am UTC
Location: Lesbians Love Bluetooth
Contact:

### Re: I hate math notation!

HarvesteR wrote:And about the single letter variables, I know many have an use attached to them, as your angle example, and that's based on convention... On the other hand, calling your variable 'angle' would produce the same effect, with much more readability.

Single-letter variables are not only easier to read and write, but they eliminate (or at least reduce) the localization problem. If you called your variable 'angle,' you would have to translate the variable name when someone who doesn't know English wants to use your formula. Most mathematicians don't want to have to memorize the word for 'angle' in a dozen languages. By standardizing on θ for 'angle,' mathematicians can know what that means no matter what languages they speak. It's along the same lines as why we write '7539' instead of 'seven thousand five hundred thirty nine.'

Damian: You're taking 12th grade calculus!?
Cady: Yeah, I like math.
Damian: Eww. Why?
Cady: Because it's the same in every country.
Damian: That's beautiful. This girl is deep.
Stephen Hawking: Great. The entire universe was destroyed.
Fry: Destroyed? Then where are we now?
Al Gore: I don't know. But I can darn well tell you where we're not—the universe!

phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

### Re: I hate math notation!

On the topic of implied multiplication, it's because that's the way English works. You can have, say, "an apple", but then you can have "five apples" which is five times as much, the implied multiplication expanding to "five times (an apple)". When you have a modifier of the form "n xs" for any number n and any object x, it's an implied scalar multiplication. And this goes into maths-in-English too, with things like "three sixes makes eighteen".

Also, because of the standard order-of-operations, it's common to write things in a sum-of-products form, and implicit multiplication makes the grouping more obvious... with "a + b * c" you need to look at the symbols, remember what they mean, and how tightly they group, before you know that the b and c are grouped together more tightly than the a. Sure, you can do this very quickly with practise, but it still takes that extra fraction of a second for each formula that uses both, which is most of them. Compare that to "a + bc", where it's instinctively obvious that the b and c are more tightly bound. I'll often approximate this in code as "a + b*c", mixing up the spacing to show the grouping. Of course then I'll see code that looks like "a+b * c" and get thrown off-kilter...

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

ImTestingSleeping
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

### Re: I hate math notation!

I don't believe the examples of mathematical notation you (the OP) have given are poor at all. In fact, I think your examples are rather flip-flopped, with the code being much more confusing than the typeset. However,there certainly are examples of mathematical notation which I consider unfortunate in their acceptance among the academic community.

Off the top of my head:

1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of [imath]\mu[/imath].

2) arcsin(x) is often written as [imath]sin^{-1}(x)[/imath] which I remembered annoyed the SHIT out of me when I was in high school. Especially since [imath]sin^{2}(x)[/imath] is the accepted notation for [imath](sin(x))^2[/imath]. Shouldn't [imath]sin^{-1}(x)=\frac{1}{sin(x)}[/imath]?

3) Similar issues with [imath]f^{-1}(x)[/imath] being the notation for the inverse of [imath]f(x)[/imath]. I never liked that notation.

4) In most calculus textbooks,[imath]log(x)[/imath] implies [imath]log_{10}(x)[/imath]. However, most analysis textbooks I've come across use log(x) when they really mean ln(x). This infuriates me. phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

### Re: I hate math notation!

ImTestingSleeping wrote:3) Similar issues with [imath]f^{-1}(x)[/imath] being the notation for the inverse of [imath]f(x)[/imath]. I never liked that notation.

I think it's a reasonable notation along with functional powers, ie f2(x) = f(f(x)), etc... f-1(x) being an inverse fits well with that.

I'll agree that it doesn't fit well with sin2(x) = sin(x)2, which I always thought was odd... though I guess there's no real use for functional powers of trig functions (outside [imath]\lim_{n -> \infty} \cos^n(x) = 0.739...[/imath] of course). But I'll agree that when I was learning trig I did confuse sin-1 with csc and cos-1 with sec on more than one occasion...

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

ImTestingSleeping
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

### Re: I hate math notation!

phlip wrote:
ImTestingSleeping wrote:3) Similar issues with [imath]f^{-1}(x)[/imath] being the notation for the inverse of [imath]f(x)[/imath]. I never liked that notation.

I think it's a reasonable notation along with functional powers, ie f2(x) = f(f(x)), etc... f-1(x) being an inverse fits well with that.

I'll agree that it doesn't fit well with sin2(x) = sin(x)2, which I always thought was odd... though I guess there's no real use for functional powers of trig functions (outside [imath]\lim_{n -> \infty} \cos^n(x) = 0.739...[/imath] of course). But I'll agree that when I was learning trig I did confuse sin-1 with csc and cos-1 with sec on more than one occasion...

I suppose it isn't as bad as I thought... I'm not sure why it came to mind. I have to admit that mathematicians generally do a very good job of handling notation, considering the amazing amount of it one encounters throughout their studies in the field. For instance, one thing that came to mind when reading your post is that the third derivative of [imath]f(x)[/imath] could be written [imath]f^{(3)}(x)[/imath] which avoids confusion with [imath]f^{3}(x)[/imath]. Little things like that allow us to maintain optimum laziness while still being clear.

Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

### Re: I hate math notation!

ImTestingSleeping wrote:
1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of [imath]\mu[/imath].

May I ask what you think the 6 different uses are?
double epsilon = -.0000001;

ImTestingSleeping
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

### Re: I hate math notation!

Dason wrote:
ImTestingSleeping wrote:
1) Basically the ENTIRE field of Probability/Statistics has HORRIBLE notation. In particular, there's like 6 different uses of [imath]\mu[/imath].

May I ask what you think the 6 different uses are?

6 was certainly a generous exaggeration. 1) Expected value/population mean
2) Often used as a parameter in distributions (off the top of my head, Laplace Double Exponential)
3) I've also seen it used to notate a moment generating function

Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

### Re: I hate math notation!

Fair enough. But even in the second situation it's typically only use a location parameter and typically only when that parameter also specifies the mean in some sense. This isn't strictly always the case (in the lognormal distribution mu alone doesn't specify the mean but it does specify the mean of the normal distribution before the transformation to lognormal). I've never seen it as referring to the moment generating function itself but I have seen it used where [imath]\mu_r[/imath] denoted [imath]E[X^r][/imath] when defining other possible forms for the MGF.

I'm not trying to say that the field has good notation in most situations. A lot of it bugs me. But I've never had too much of a problem with mu in particular.
double epsilon = -.0000001;

++\$_
Mo' Money
Posts: 2370
Joined: Thu Nov 01, 2007 4:06 am UTC

### Re: I hate math notation!

Mathematical notation is designed to make it as easy as possible to read a whole expression at once (including determining the order of operations, figuring out what "kind" of expression it is, and so on). It is not designed to be compiled, because people are not compilers.

That is why we have horizontal bars to represent fractions and little houses to represent square roots and so on. Your example (where you got the quadratic formula wrong) shows one reason why this is important. Also, this is the reason that implied multiplication is a good notation -- because it allows us to put things that are being multiplied closer together than things that are being added. Exponentiation binds even tighter because the exponents are even closer to the base than the multiplicands are to each other. For example, in$1 + 2x + 3x^2 + 4x^3,$ it is obvious at a glance what is going on. That is not true of

Code: Select all

1 + 2 * x + 3 * x ^ 2 + 4 * x ^ 3.
The notation is designed with reading in mind, rather than with easy typesetting in mind. This is appropriate because any given piece of written material is typeset only once, but read many times. As a consequence, we have lots of big symbols (like [imath]\sum[/imath] and [imath]\int[/imath]), with lots of parts, that scream out to the reader what kind of expression this is. These also put related things close together in one tidy visual package -- in this case, the limits of the summation and the independent variable. The alternative is to write

Code: Select all

sum(n, 1, 100, EXPR)
which is much messier visually (especially if 1 or 100 are replaced by more complicated expressions). However, it is easier to type. That is not the point.

Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: I hate math notation!

ImTestingSleeping wrote:2) arcsin(x) is often written as [imath]sin^{-1}(x)[/imath] which I remembered annoyed the SHIT out of me when I was in high school. Especially since [imath]sin^{2}(x)[/imath] is the accepted notation for [imath](sin(x))^2[/imath]. Shouldn't [imath]sin^{-1}(x)=\frac{1}{sin(x)}[/imath]?

3) Similar issues with [imath]f^{-1}(x)[/imath] being the notation for the inverse of [imath]f(x)[/imath]. I never liked that notation.

It's [imath]sin^{2}(x)[/imath] that's the offender here. Functional power notation is well-established to mean iterated application or inversion. [imath]sin^{2}(x)[/imath] is dumb, because [imath](sin(x))^2[/imath] is a perfectly good representation already.

4) In most calculus textbooks,[imath]log(x)[/imath] implies [imath]log_{10}(x)[/imath]. However, most analysis textbooks I've come across use log(x) when they really mean ln(x). This infuriates me. And then in Comp Sci it means [imath]log_{2}(x)[/imath]. I'm not a big fan of the context-dependency of the function either, but at least once you learn how a particular context interprets it it's okay.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

Thesh
Made to Fuck Dinosaurs
Posts: 6598
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

### Re: I hate math notation!

We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions
Summum ius, summa iniuria.

masher
Posts: 821
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

### Re: I hate math notation!

Xanthir wrote:
ImTestingSleeping wrote:2) arcsin(x) is often written as [imath]sin^{-1}(x)[/imath] which I remembered annoyed the SHIT out of me when I was in high school. Especially since [imath]sin^{2}(x)[/imath] is the accepted notation for [imath](sin(x))^2[/imath]. Shouldn't [imath]sin^{-1}(x)=\frac{1}{sin(x)}[/imath]?

3) Similar issues with [imath]f^{-1}(x)[/imath] being the notation for the inverse of [imath]f(x)[/imath]. I never liked that notation.

It's [imath]sin^{2}(x)[/imath] that's the offender here. Functional power notation is well-established to mean iterated application or inversion. [imath]sin^{2}(x)[/imath] is dumb, because [imath](sin(x))^2[/imath] is a perfectly good representation already.

I, too, believe that [imath]\sin^2(x)[/imath] is a representation of [imath](\sin(x))^2[/imath]. It did also annoy (the shit out of) me when (in high school), they wrote [imath]sin^{-1}(x)[/imath]* to mean [imath]\arcsin(x)[/imath].

There is also a third notation that I don't like: [imath]\sin(x)^2[/imath]. Its halfway between [imath](sin(x))^2[/imath] and [imath]sin(x^2)[/imath]. It shits me. If you mean [imath]\sin^2(x)[/imath], then write that, if you mean [imath]sin(x^2)[/imath], then write that!

.

* It follows then, that [imath]sin^{-1}(x)[/imath] should mean [imath]\frac{1}{sin(x)}[/imath]. Why is this referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?

phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

### Re: I hate math notation!

masher wrote:Why is [1/sin(x)] referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?

Because this. The three main functions, sin, tan and sec, are measurements on right-triangles with theta in the centre of the unit circle. On the other hand, cos, cot and csc are those same measurements with theta being the complementary angle (or, equivalently, the other acute angle in the triangle).

Your odd/even point is a bit weird, because sin being odd and cos being even isn't why one has the co- prefix and the other doesn't... Also, both tan and cot are odd functions. So there isn't exactly a pattern here for sec/csc to break.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: I hate math notation!

masher wrote:There is also a third notation that I don't like: [imath]\sin(x)^2[/imath]. Its halfway between [imath](sin(x))^2[/imath] and [imath]sin(x^2)[/imath]. It shits me. If you mean [imath]\sin^2(x)[/imath], then write that, if you mean [imath]sin(x^2)[/imath], then write that!

This is why the algebra notation for sin^2 is so horrible!

[imath]\sin(x)^2[/imath] is perfectly fine. It means to square the result of sin(x). [imath]sin(x^2)[/imath] means to take the sine of x2. [imath]\sin^2(x)[/imath] should mean to take the sine of the sine of x, exactly like the power notation on functions means everywhere else.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

masher
Posts: 821
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

### Re: I hate math notation!

phlip wrote:
masher wrote:Why is [1/sin(x)] referred to as the cosecant? I mean that, sine/cosine and cosecant/secant are both odd/even functions, so why the change in prefix?

Because this. The three main functions, sin, tan and sec, are measurements on right-triangles with theta in the centre of the unit circle. On the other hand, cos, cot and csc are those same measurements with theta being the complementary angle (or, equivalently, the other acute angle in the triangle).

OK. I've never really investigated the origins of the functions in that way

phlip wrote:Your odd/even point is a bit weird, because sin being odd and cos being even isn't why one has the co- prefix and the other doesn't... Also, both tan and cot are odd functions. So there isn't exactly a pattern here for sec/csc to break.

I was just searching for reasons...

archeleus
Posts: 240
Joined: Wed Sep 29, 2010 1:49 pm UTC
Location: Valenvaryon
Contact:

### Re: I hate math notation!

2) arcsin(x) is often written as sin−1(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin2(x) is the accepted notation for (sin(x))^2. Shouldn't sin^(−1) (x)=1/sin(x)?

Agreed wholeheartedly.

I still just write arcsin and I think the TI-89's function is arcsin() (not sure, haven't touched it in some months).
I write a blog rant here.

ImTestingSleeping
Posts: 88
Joined: Mon Dec 06, 2010 3:46 am UTC

### Re: I hate math notation!

archeleus wrote:
2) arcsin(x) is often written as sin−1(x) which I remembered annoyed the SHIT out of me when I was in high school. Especially since sin2(x) is the accepted notation for (sin(x))^2. Shouldn't sin^(−1) (x)=1/sin(x)?

Agreed wholeheartedly.

I still just write arcsin and I think the TI-89's function is arcsin() (not sure, haven't touched it in some months).

Unfortunately, no. Most likely because arcsin(x) is so much longer and it wouldn't fit nicely, but it is still unfortunate. I'd like to see the community stray away from the notation if possible...

Random-person
Posts: 21
Joined: Mon Dec 13, 2010 1:25 am UTC

### Re: I hate math notation!

Why not use the names used in the standard c math library: asin, acos, atan and so forth?
(by the way, I really hate that math teachers don't know about atan2, eg. an atan function that works with angles >½π ).

Thesh wrote:We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions

TIL about lb... That's brilliant! Though given that I've never ever seen it before, I'm guessing it's very rare?

Right now when I'm writing in ascii (eg. when coding or doing a problem in notepad) I'm using lg for base 10, ln for base e, lg2 for base 2 and completely avoiding log (as nobody knows when the hell it's base 10 and when it's base e).

masher
Posts: 821
Joined: Tue Oct 23, 2007 11:07 pm UTC
Location: Melbourne, Australia

### Re: I hate math notation!

Thesh wrote:We should migrate away from using log(x) without a base specified. There are already standards for shorthand for base 2, e, and 10:

http://en.wikipedia.org/wiki/ISO_31-11# ... _functions

Yes! I didn't even know this existed. I will start using it from now.

Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: I hate math notation!

Random-person wrote:(by the way, I really hate that math teachers don't know about atan2, eg. an atan function that works with angles >½π ).

Why should math teachers know about a C function? What relevance would a programming-language convenience have to math class?
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

user2.0
Posts: 2
Joined: Wed Jan 12, 2011 1:26 am UTC

### Re: I hate math notation!

Thesh wrote:
masher wrote:No. Your example is why I hate maths not written as maths.
Your psuedocode is ambiguous (and also has redundant brackets).

Does (-b + sqrt( b^2 - 4*(a*c))) / 2 * a mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2a}}[/imath] or does it mean [imath]{\frac{-b + \sqrt{b^2 - 4ac}}{2}}a[/imath]

They will give very different results.

That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

[imath](-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a[/imath]

The equation you are looking for is this:

[imath]x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}[/imath]

Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.

But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as [imath]6 \div 2 * 3[/imath] stands.

Robert'); DROP TABLE *;
Posts: 730
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

### Re: I hate math notation!

user2.0 wrote:But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as [imath]6 \div 2 * 3[/imath] stands.

3-2+1=2 no matter which way you parse the operators. It's not equivalent to 3-(2+1), but 3+(-2+1).
...And that is how we know the Earth to be banana-shaped.

Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

### Re: I hate math notation!

Robert'); DROP TABLE *; wrote:
user2.0 wrote:But, such a strict reading of the order of operations gives 3-2+1=0 since the addition must happen first, where as most people would say 3-2+1=2. I counter that the ambiguity of such things as [imath]6 \div 2 * 3[/imath] stands.

3-2+1=2 no matter which way you parse the operators. It's not equivalent to 3-(2+1), but 3+(-2+1).

I could have swore I replied to this earlier this morning... What the poster doesn't understand is that addition and subtraction have the same priority in the order of operations. They do think that it's equivalent to 3-(2+1) because they think + has a higher precedence over -. This is clearly wrong though and wikipedia agrees.
double epsilon = -.0000001;

user2.0
Posts: 2
Joined: Wed Jan 12, 2011 1:26 am UTC

### Re: I hate math notation!

Dason wrote:... addition and subtraction have the same priority in the order of operations. They do think that it's equivalent to 3-(2+1) because they think + has a higher precedence over -....[/url]

That was my point, but about division and multiplication. Most people would have [imath]6 \div 2 * 3=9[/imath] (i.e. just work left to right), whereas Thesh would have [imath]6 \div 2 * 3=1[/imath] (i.e. multiplication first and then division).

I was attempting to point out the flaw of Thesh's reasoning for a lack of ambiguity in a/b*c (namely that multiplication must happen before division and thus a/b*c must be equal to a/(bc) and not ac/b as normal) by creating an absurdity using similar reasoning.

Thesh
Made to Fuck Dinosaurs
Posts: 6598
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

### Re: I hate math notation!

Uhh... Where did I say that?
Summum ius, summa iniuria.

user2.0
Posts: 2
Joined: Wed Jan 12, 2011 1:26 am UTC

### Re: I hate math notation!

Thesh wrote:
That's where order of operations come in. That statement is equivalent to this (which isn't what was intended):

[imath](-b + \sqrt{b^2 - 4ac}) \div 2 \cdot a[/imath]

The equation you are looking for is this:

[imath]x = {\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}}[/imath]

Which would be this
x = (-b + sqrt( b^2 - 4*(a*c))) / (2 * a)
And/Or this:
x = (-b - sqrt( b^2 - 4*(a*c))) / (2 * a)

And I think it' a hell of a lot easier to read when you don't have to match all the parentheses.

Did I misinterpret what you are saying here? If so, sorry.

Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

### Re: I hate math notation!

You must be, because in that post Thesh is saying exactly what everyone else here is - "a / b * c" is different from "a / (b * c)", because in the first one you have to evaluate the division first.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

user2.0
Posts: 2
Joined: Wed Jan 12, 2011 1:26 am UTC

### Re: I hate math notation!

Seems I'm failing reading comprehension lately. Again, I apologize for misquoting you, Thesh.

Darryl
Posts: 327
Joined: Mon Sep 22, 2008 2:32 pm UTC

### Re: I hate math notation!

HarvesteR wrote:

Code: Select all

      deg = rad * 180 / PI;      or this:      (-b + sqrt( b^2 - 4*(a*c))) / 2 * a;
Having used "pseudomath" to express stuff in an IRC chat, that gets ugly as sin very quickly. Even the Quadratic Formula there is already ugly, and the Cubic just goes beyond anything reasonable without real math expressions.

than this:
[imath]deg = rad \cdot {180 \over \pi}[/imath]

or this:
[imath]{-b + \sqrt{b^2 - 4ac} \over 2a}[/imath]
This has implicit ordering built in, and is plenty readable as is. Not to mention that you don't need to use imath for formulas when they're standing alone, and they're more readable as full-size math:

${-b + \sqrt{b^2 - 4ac} \over 2a}$

<snip>

What I mean is that math is downright scary for most students (and most people) because it is normally presented in a way that makes a terrible first impression.
When I was a kid I didn't even bother trying to make sense of it... I just shied away from it because it seemed incomprehensible... now I wish I had made a bigger effort, but I reckon at the time none of it seemed to matter (one could also accuse grade school teachers of not generating enough interest, but let's not get into that).

<snip>
While it can seem difficult at first, what is important is to remember that, just like pseudocode, there are certain standards to adhere to. Much like i, j, and k in coding are (nearly) always count variables, most lower-case greek letters, especially [imath]\theta[/imath] and [imath]\alpha[/imath] represent angles. [imath]a[/imath], [imath]b[/imath], and [imath]c[/imath] are dependent on context, but will either be the coefficients of a quadratic (further polynomials tend to extend it, with a being on the highest power, or use [imath]c_n[/imath]) or the three sides of a right triangle, with [imath]c[/imath] the hypotenuse, while [imath]a[/imath] and [imath]b[/imath] are defined in the diagram. Putting an arrow over a variable declares it to be a vector.

So, while it would work for simpler stuff, using it on the stuff that can be read that way does the opposite of what you think it would, by making advanced math even more impenetrable than people already deem it.

In fact, let's give the Cubic Formula, and only for the primary root, in pseudomath, just to show how bad it is.

Code: Select all

x_1 = - b/(3 * a) - (1/(3 * a)) * (0.5 * (2 * b^3 - 9 * a * b * c + 27 * a^2 * d + sqrt((2 * b^3 - 9 * a * b * c + 27 * a^2 * d)^2 - 4 * (b^2 - 3 * a * c)^3)))^(1/3) - (1/(3*a)) * (0.5 * (2 * b^3 - 9 * a * b * c + 27 * a^2 * d - sqrt((2 * b^3 - 9 * a * b * c + 27 * a^2 * d)^2 - 4 * (b^2 - 3 * a * c)^3)))^(1/3)

If you can parse the groupings in that quickly, I'll be extremely surprised. I had to triple-check that I did them right translating from the original.
yurell wrote:We need fewer homoeopaths, that way they'll be more potent!

JoeZ
Posts: 22
Joined: Thu Jan 20, 2011 3:35 pm UTC

### Re: I hate math notation!

HarvesteR wrote:I'd much rather read the entire equation on a single line.

Which is great, until you have to multiply/divide one fraction (or sum of fractions) by another. Also, math (after algebra) is not really a static thing, with all the erasing and moving and squeezing symbols into spaces I'm doing already, I'd hate having to manage parentheses as well.
I can't go, this is too important. Someone is wrong on the internet!

mister k
Posts: 643
Joined: Sun Aug 27, 2006 11:28 pm UTC
Contact:

### Re: I hate math notation!

one habit that does bug me, or did when I was still having to attend lectures, was the tendency for similar notation to crop up. x and y are fine- difficult to confuse. u and v... less so. n and m? p and [imath]\rho[/imath]? ARGH! I spent an entire day of revision realising I had confused pressure and density multiple times while writing.

But generally, yeah, having a fraction is useful, and somewhat inutitive, because, when writing by hand, I want to be able to cancel and group terms with ease, which simply isn't possible with coding language. I suspect coding language is set up like that because its quite HARD to make fractions look like that in coding language. That is, mathematical termology tends to be whats convinient. I also suspect multiplication happens "more" than addition which is why its often substituted.
Elvish Pillager wrote:you're basically a daytime-miller: you always come up as guilty to scumdar.

Zach 739085133
Posts: 11
Joined: Tue Jan 25, 2011 5:30 am UTC

### Re: I hate math notation!

I agree that the inconsistency between [imath]sin^{-1}(x)[/imath] and [imath]sin^{2}(x)[/imath] is unfortunate. Even the name "inverse sine" is regrettable because the sine wave is not invertible. We work around that by inverting a small part of the curve. For those reasons I always use [imath]\arcsin(x)[/imath], even when scribbling notes on my own.

One thing I would change if I had the power would be to do away with the symbol π, and use a single symbol to represent the ratio between a circle's circumference and its radius. (The number we call 2π.) For this post let me use τ. That way when you are learning trigonometry in radians, a quarter of the way around the circle would be τ/4, halfway around would be τ/2, etc.

With all that said, it's easier to accept the notation we've inherited than to try to change it. Changing the books and calculators alone would be a huge project. There is no notation that students can not learn. There's no true or false about symbols. Just convenience and ability to communicate.

ps: Thanks to the poster who explained why the prefix gets switched between sin,csc and cos,sec. That explanation would make teaching and learning the six trig functions easier.

pss: As demonstrated above, I'm fine with using / for division, especially when typing.

EDIT: Replaced original symbol ❖ with τ for circumference/radius. Upon further reflection, even though I prefer τ there is no reason to do away with π. Just as we use both degrees and radians, π and τ can coexist.
Last edited by Zach 739085133 on Sun Jan 30, 2011 7:06 pm UTC, edited 1 time in total.

Dason
Posts: 1311
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/

### Re: I hate math notation!

Zach 739085133 wrote:pss: As demonstrated above, I'm fine with using / for division, especially when typing.

I don't think anybody has a problem with using / for simple division. It's when you start to get nested operations and you need to enter a parenthesis hell that it starts to get inconvenient to use / as opposed to [imath]\frac{x}{2}[/imath] notation.
double epsilon = -.0000001;

Return to “Religious Wars”

### Who is online

Users browsing this forum: No registered users and 8 guests