Writing mathematics with a computer
We need to learn how to write mathematics by typing. There are some conventions to use that are simple enough to learn.
First, one of the most important ones is that you should use a fixed-width font like courier. A non-fixed width font (like used here!) can make things not line up correctly.
Second, we need to know how to handle exponents, fractions, subscripts etc.
We call powers exponents. Here are some examples:
$$x^2, (a+b)^2, (1+x)^{1/2}, (\frac{x^2}{y^3})^{-1}$$
These are rendered in HTML to look like an exponent. You’ll notice that it isn’t perfect. ( Aside. The presentation of mathematics is waiting patiently for the next generation of page display MathML a subclass of XML.)
Now, in sending an email or posting to the newsgroup, It would be ridiculous to have you learn how to type the HTML to do exponents. (I didn’t do it myself). Instead we adopt a few simple conventions. The most important it the symbol
^
This means the power (as it might on your calculator). So the above could be written as
x^2, (a + b)^2, (1 + x)^(1/2) and ( (x^2) / (y^3) )^(-1)
Notice a few things:
I used extra space sometimes. This can increase readability.
I used parentheses to block expressions. This is very important.
Even with all these tricks, the last one gets rather tedious.
It would be real nice to be able to write for $(1+x)^{1/2}$ the expression
$$\sqrt{1 + x}$$
but it isn’t going to happen, so you will have to get used to the other form. And this means you’ll really get to know how to deal with exponents!
We won’t make much use of this, but there will be a few formulas most notably, the formula for the slope of a line is often written as
$$m = \frac{y_1 - y_0}{x_1 - x_0}$$
How to we write this? Well, the subscripts are indicated with the
_
(underscore)
character. So you could write something like
m = (y_1 - y_0) / (x_1 - x_0)
Again, I really need to know what the parentheses do to make sense of this expression.
Now, we’ve written fractions above with the
/
(forward slash)
division symbol, which is consistent as fraction are all about division. When expressions get complicated we use parenthesis. So that
$$\frac{1}{1+x^2}, \frac{3}{4} + \frac{4}{3}, \frac{\frac{1}{x}+ \frac{1}{y}}{xy}$$
Become
1/(x^2), (3/4) + (4/3) and ( (1/x) + (1/y) ) / (xy)
The first two are okay, but the last one begs for some kind of formatting. One way arount this that works is to use typewriter formatting. (this is why a fixed width font is best)
1 1
- + -
x y
-----
xy
How did I do? Notice I used the subtraction sign to make the division symbols.