Basis Lab

Reading the Notation

Four Different Equals Signs

Last timeProducts, Powers and Roots

An equals sign can define a thing, claim something always true, pose a question, or record one lucky coincidence. The four read very differently.

The equals sign looks like the least interesting mark on the page. It is

actually doing four unrelated jobs, and knowing which one is in force changes

what you should do with the line.

The four jobs

Here are four lines, all with an equals sign, and no two of them are the same

kind of statement.

The first is a definition. Somebody writes that the loss is the average

squared error, and in doing so introduces a name that did not exist a moment

ago. Nothing about a definition can be wrong. The author is entitled to call

that quantity anything they like, and trying to verify the line is wasted

effort. The only sensible response is to remember the name.

The second is an identity. Somebody writes that a certain sum equals

n(n+1)/2n(n+1)/2, and that is a claim: it says the two sides agree for every value of

nn. It can be checked and it can be false. If it is true, somebody had to

prove it, and the fact that proving it was work is part of what the line is

telling you.

The third is an equation. Somebody writes that something equals nought and

means it as a question: which values make this true. Here the equals sign is

not asserting anything at all, it is posing the problem, and the answer is a

set of values which may be empty, may be one, may be infinite.

The fourth is a coincidence. Somebody writes that the error at step fifty

equals the error at step ninety. Two particular quantities happen to match,

nothing general follows, and the line is an observation rather than a law.

FIG 1Eight lines, and which job the sign is doing in each
stepthe linewhich jobhow you knowwhat to do with it
1L equals the average squared errordefinitionthe name on the left has not been used beforeremember the name; there is nothing to check
2the sum of 1 to n equals n(n+1)/2identityboth sides were already meaningful, and it claims they always agreecheck a small case, then trust the proof it came from
3x^2 - 5x + 6 equals 0equationthere is an unknown and the line is clearly asking somethingsolve it: the answer is a set of values, here two of them
4the loss at step 50 equals the loss at step 90coincidenceboth sides are particular numbers from a particular runnote it; nothing general follows
5the derivative of x^2 equals 2xidentityit holds for every x, and was proved onceuse it as a rule anywhere
6theta := theta - a*gassignmentthe colon before the equals, and the same name on both sidesread it as an instruction executed repeatedly, not a claim
7sin(x) is approximately xan approximate claimthe approximate sign, and a missing conditionfind the condition; it is only true for small x
8the cost is proportional to n^2a claim up to a constantthe proportional sign, with the constant deliberately droppeduse it to compare sizes, never to predict a running time in seconds
8 steps
The sixth row is the one that confuses readers who come from code and the one that confuses readers who come from mathematics, in opposite directions. As a claim it is nonsense, since nothing equals itself minus something. As an instruction it is the whole of how a model gets trained. The colon is the clue, and plenty of authors leave it out.

Telling a definition from a claim

Some authors mark their definitions. A colon before the equals sign, a triple

bar instead of the equals sign, or the words we define, let, or set. Any of

these says explicitly that a name is being introduced.

Most authors do not mark them, and then the test is the one in the table above:

look at the left-hand side and ask whether you have seen it before on this

page. If it is new, the line is a definition. If it was already meaningful, the

line is a claim about it.

The lesson stops here

5 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

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

The rest of this course

  1. 01A Letter Is Standing In For Something
  2. 02Something In, Something Outopening only
  3. 03The Sum Sign Is a Loopopening only
  4. 04Numbering Thingsopening only
  5. 05Products, Powers and Rootsopening only
  6. 06Four Different Equals Signsyou are here
  7. 07The Alphabet Everyone Assumesopening only
  8. 08Reading One Real Formula All the Way Throughopening only

Read alongside