A Letter Is Standing In For Something
Every letter in a formula is doing one of three jobs. Working out which job each one has is the first move in reading any line of mathematics.
Here is a line from a paper that a great many people stop reading at.
There is nothing hard in it. It says: multiply each number in your data by its own weight, add the results up, and divide by how many there were. The difficulty is not in the idea, it is that the line contains seven marks and nobody ever explained what marks are for.
This course is about the marks. Not about doing mathematics, about reading it. And the first thing to know is the most basic thing, which is that every letter on the page is standing in for something, and your first job as a reader is to work out what.
Three jobs
A letter in a formula is doing one of three jobs.
It might be a quantity you were given. In the line above, is the number of examples in your data. You do not know what it is while reading, but somebody knows, and when the formula is actually used it will be a specific number like nine hundred. The formula is written with a letter so that it works for any number of examples.
It might be an unknown that the formula is about to produce. In the line above that is , the prediction. The whole point of the line is to say what it equals.
Or it might be a name for a whole collection of numbers rather than a single one. In the line above both and are of this kind: is all your input numbers together, and is the -th one of them.
That third job is the one that causes trouble, because a letter naming nine hundred numbers looks exactly like a letter naming one. The symbol does not tell you. Only the surrounding words tell you, which is why the surrounding words are not optional.
- the unknown: the single number this line exists to produce. The hat is a convention meaning an estimate rather than a true value, which is the subject of a later lesson
- a given quantity: how many examples there are. A specific number in any actual use, written as a letter so the line covers every case
- a collection: all the input numbers. Never used on its own here, only ever with a subscript attached
- a collection of the same size: one weight for each input, which is what makes the subscripts line up
- a local placeholder, not a quantity at all. It takes the values one to n in turn while the sum is carried out and then ceases to exist
The conventions nobody states
Nothing forces an author to use a particular letter for a particular job, and yet almost all of them do. The habit is old and widely shared, and knowing it is worth more than any other single thing when reading an unfamiliar line.
| Where the letter comes from | What it usually is | Examples |
|---|---|---|
| Start of the alphabet | a fixed given quantity | , , |
| The run from to | a counter, an index, or a count of things | , , , , |
| End of the alphabet | the data, and the unknowns | , , |
| A capital | a whole collection: a matrix, a set, a table | , , |
| A Greek letter | a quantity somebody chose or is trying to learn | , , |
| A letter with a hat | an estimate of the thing without the hat | , |
Read the convention as a strong hint rather than a rule. Seeing in a formula you have never met before, your first guess should be that it counts something, and you should hold that guess until the text contradicts it. That is how a practised reader gets through a page quickly: not by knowing what every letter means, but by expecting the usual and noticing the unusual.
The most useful entry in that table is the capital. A capital letter is nearly always a collection of numbers rather than one number, and the single most common reading error is treating one as the other. If a line divides by and is a table of nine hundred rows, you have misread the line, because dividing by a table is not a thing that happens.
Letters that exist only inside one expression
Look again at in the formula. It is genuinely different in kind from the other four letters, and the difference is worth being precise about.
means the same thing on every line of the page. If the author decided to call it instead, every line mentioning it would have to change.
means nothing on any line of the page. It exists only between the sum sign and the end of what is being summed. Inside there it takes the value one, then two, then three, up to , and then the sum is finished and is gone. If the author called it instead, the formula would mean exactly the same thing, and nothing else on the page would need to change at all.
A letter of that kind is called bound, and there are three places they turn up: under a sum or product sign, under an integral sign, and after a for-all or there-exists claim. Everywhere else, letters are free, which means they mean the same thing throughout.
Two practical consequences follow, and both are immediately useful. First, the same can appear in four unrelated sums on one page and there is no conflict, in exactly the way that two different recipes can both use the word each. Second, if a bound letter appears in the result of the expression that bound it, something has gone wrong: a sum over cannot produce an answer that still mentions , any more than a loop can produce an answer that still mentions its own counter.
| step | what you are looking at | the question to ask | the answer in this case |
|---|---|---|---|
| 1 | the whole line | what single thing is this line claiming? | that the left side equals the right side, so the line is a definition of the left side |
| 2 | is this given, unknown, or a collection? | unknown, and the one this line produces. Everything on the right is therefore known or assumed known | |
| 3 | the sum sign | which letter is it binding, and over what range? | it binds i, and the range is written above and below: from one to n |
| 4 | what is one term of the sum? | one weight times one input, for whichever i the sum has reached. So the sum needs w and x to have the same number of entries | |
| 5 | is this inside the sum or outside it? | outside, because it is written to the left of the sum sign. So the division happens once at the end, not n times | |
| 6 | , appearing twice | is it the same n both times? | yes: n is free, so it means the same thing in the limit of the sum and in the fraction. That is what makes this an average rather than something else |
Where a letter was introduced
Every letter in careful mathematical writing was introduced somewhere, and the introduction carries more information than the name does.
The introductions look like this. A sentence beginning let, as in let be the number of training examples. A clause beginning where, which is why the figures in this library have a where list under them. A phrase attached to the formula, like for all in one to . Or a declaration of kind, written with a symbol this course covers later, saying that is a real number or that is a table of a particular shape.
The practical advice is to go and find it. When a letter stops you, the answer is almost never going to come from staring at the formula; it is three paragraphs above, in a sentence that looked like prose and was actually a definition. Reading mathematics well involves a lot of scrolling backwards, and practised readers do it constantly rather than as a sign of difficulty.
The other half of the advice is what to conclude when the declaration is not there at all. Sometimes it is genuinely absent, and then the formula is incomplete and the fault is the author's. This is worth saying plainly because the instinct of most readers is the opposite: to assume that an unexplained symbol is something they should already know. Quite often it is something nobody could know.
def predict(w, x):
n = len(x) # w and x are the collections, n the count
total = 0.0
for i in range(n): # i is bound: it exists only in here
total += w[i] * x[i] # one term of the sum
return total / n # the 1/n, applied once, outside the loopWhat to take from this
Reading a formula starts with an inventory. Which letters are here, and what is each one standing in for.
There are three answers available: a quantity somebody will supply, an unknown the line is about to pin down, and a name for a whole collection. The conventions tell you which is most likely, the declarations in the surrounding text tell you for certain, and the one genuinely different kind of letter is the bound one, which lives inside a single expression and means nothing outside it.
Do that inventory on the next formula you meet before trying to understand what it says. The understanding tends to arrive on its own once the inventory is done, because most of what feels like mathematical difficulty is the strain of trying to follow a sentence while four of the nouns are still unidentified.
Recap
- A letter in a formula is always standing in for something, and it is doing one of three jobs: it is a fixed quantity you were given, an unknown the formula is about to pin down, or a name for a whole collection of numbers rather than a single one.
- Which job a letter has is never stated, because there are conventions instead. Letters from the middle of the alphabet count things, letters from the end hold data, capitals usually name a collection, and a letter introduced under a sum sign exists only inside that sum.
- A formula in which some letter was never introduced anywhere is not a hard formula, it is an incomplete one. Finding where each letter was declared is part of reading, and if a letter has no declaration the problem is with the page and not with the reader.
This is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents