Notation
...or also "How Do I Type in a Problem to #math? How Do I Read a Problem Somebody Wrote or Understand the Notation of the Answer?"
Quick Answer: Usually very like many computer languages. The main problems are no graphics, superscripts, subscripts, color, bold face, Greek letters, symbols, etc. Just plain text. The method needs to be almost context free like a simple computer language. Lots of ( ) are necessary that are not necessary in books and on paper.
Table of contents |
Numbers
Enter ordinary integer numbers just like 13, 67, or -119. The last one is negative.
Avoid a comma "," in the number because that will confuse Americans or Europeans or both. 1,001 is not "one thousand and one" to many Europeans. Europeans may read this as 1.001. Likewise, if you are from Sweden and write 1,001, Americans will think you mean "one thousand and one".
Decimal fractions you write as 1.13, e.g. to mean "one and 13 hundredths".
For scientific numbers use * for "multiply" and ^ for "raise to a power". 1.23456 * 10^4 means 12345.6. I sometimes use( ) around a negative exponent such as 1.23 * 10^(-4) for .000123. This is not strictly necessary since 1.23 * 10^-4 means do the unary - first, then ^ and then *. Avoid typing 10^4 as ten with a little superscript 4 even if you know how. The fonts others use may render that as a mess.
Operators
Arithmetic Operators are:
- ^ raise to a power.
- * multiply.
- / divide.
- - subtract, change sign of the next expression and then add. You can write a - b instead of a + -b.
- + add.
Operators have a property called "precedence" which is the rule deciding the order in which to do operations. ^ has a high precedence meaning it goes first. Only "unary -", "change the sign of the next expression" has a higher one. There are strict precedence rules for computer languages but in IRC not everybody will use them perfectly, so watch out.
Example: 7*2^3*5 is 7*2*2*2*5. Notice that is not the same as 14*14*14*5 or 14^15 or the other possibility.
( ) are used around parts of an expression to mean "do everything inside here first no matter what". ( ) override the precedence defaults of operations. If the ( ) are nested go to the deepest inside set first. So if you wrote (7*2)^(3*5) that would be 14^15.
/ and * have lower precedence than ^ but higher that + (add) or - (subtract). Notice that the symbol - is used in two ways with very different precedences. You should be able to tell from syntax which meaning of - is being used.
Example: 2*3+4*5 is 26, not 2*7*5 = 70; 2*3-4*5 is -14; a^-x+y = (a^(-x))+y
a + b _____ c + d
Entering expressions from paper or from from a text document takes a lot of care. Use plenty of brackets in expressions. More than you would on paper. This is to make it clear in what order you intend operations to be done. If your book has an expression like that on the left, you have to write this as (a+b)/(c+d) on one line and adding all the brackets.
Books have the vinculum "long bar" that acts like brackets when making fancy fractions so you have to add brackets on #math to get that.
A typical gotcha is to write 1/3*x intending 1/(3*x) because the book has a bar over the 3 and the x both. 1/3*x means exactly the same as x/3 because the / is done before the the *.
Constants, Functions and other Alphabets
You can use "e" for the base of natural logs and just spell out Greek letters: alpha, beta, gamma, etc. pi is 3.1415... Aleph0 means aleph null. {} is the empty set. "P" is the Weierstrass Elliptic Function symbol and also the Artist formerly known as Prince (also written as ~).
Entering Functions Standard functions are sin(x), cos(x), tan(x), ln(x) (natural log), sqrt(x), exp(x) etc. Use (). Trig functions have a strange convention that sin^(-2)(x) means the same as 1/(sin(x))^2. But watch out for sin^(-1)(x)this means the inverse function, arcsin(x), not 1/sin(x). arcsin(x) is clear and easier to type.
Common Example of Some of This. Roots of a quadratic equation a*x^2 + b*x + c = 0 are: x = (-b +\- sqrt(b^2 -4*a*c))/2
Because of the nested brackets the first thing to be done is: (b^2 -4*a*c). Operator precedence means square b, then compute 4*a*c, and then subtract. The weird +\- means + or - both are OK, that is there are two solutions. The outer ( ) around (-b +\- sqrt(b^2 -4*a*c)) are necessary. Otherwise, the higher precedence of / would cause the division to be done before the +\-. Your book probably will not have any of these brackets because it can draw a long vinculum under the whole numerator above the 2 and another vinculum over b^2-4ac after the special sqrt symbol.
Common Confusing Examples: y = 1/x + a, be aware that the other person might mean 1/(x+a) and not (1/x) + a which is correct. y = 1/2x If you mean this, use y = x/2. It is much less likely to be misread. If the x is in the denominator too you have to say 1/(2x) or (2x)^-1 or 1/2/x.
Derivatives, Sums, Integrals
The Calculus Ordinary derivatives you can write as d^2x/dt^2, dy/dx, etc. This is a special use of d to save space. You also put a ' "prime" on a function y = f'(x), y = (u(x)*v(x))' is OK.
Partial derivatives are a problem. If possible just say "derivatives are partial" and use du/dx and du/dy to mean partial derivatives for this one problem. If there are lots of them use an uppercase letter for the function and lowercase letters for derivatives. Uxx + Uyy +Uzz for del^2 (U) in Cartesian coordinates.
For integrals just use a function notation: Integral (a to b) (f(x) + g(x))dx. Use a lot of brackets. Integral (1 to 3) dx/x^2 + 1 This ought to mean (-1/3 + 1/1). But the writer probably intended arctan(3) - arctan(1). I recommend using brackets and putting dx last. Integral (1 to 3) (1/x^2)dx + 1 means do the integral and then add 1. Integral (1 to 3) (1/(x^2 + 1))dx Integral (0 to oo) (sin(x)/x)dx. Lots of people use oo for infinity.
Do Sum (Greek big Sigma) like this. Sum (k, 1 to n) (k^2) = 1^2 + 2^2 + ... + n^2.
Product (Greek big PI) like this. Product (k, 1 to n) (k+2) = (1+2)*(2+2)*...*(n+2) = (n+2)! / 2
Variables
Computer languages usually allow variables to be several letters long and require * to be used for multiply. The IRC usage seems to be to allow variables with several letters and to use * a lot for multiply but not always require it. People can handle the ambiguity, sort of.
y = mx + b this seems like a harmless use of the implied * but y = m*x + b is fine too.
But you might want to say: "three integers kx, mx, and nx" now you probably do not mean multiply by x in every case.
A number after a letter is nice too as in x1,x2,x3 as a substitute for subscripts on paper.
Linear Algebra
If a matrix is smaller than 10 by 10, it is OK to write elements of it as B12, B45, etc. It gets tiresome to write B[1,2] and B[4,5]. Bij and Cjk seem OK too.
Aij = Sum(m,1 to n)(Bim * Cmj) A[i,j] = Sum(m,1 to n) (B[i,m] * C[m,j]) both of these are OK.