# What does := mean?

What does := mean?

• Generally it means "is defined to be equal to." – Qiaochu Yuan Mar 5 '11 at 22:32
• It's one common notation for stating that the left-hand side is defined as (in contrast to equal to) the expression on the right-hand side. – cardinal Mar 5 '11 at 22:33
• For future reference, the table of mathematical symbols at wikipedia is fairly extensive and has a number of further references. – Harry Stern Mar 6 '11 at 2:11

## 2 Answers

It is borrowed from computer programming: it means that the item on the left hand side is being defined to be what is on the right hand side. For example, $$y := 7x+2$$ means that $y$ is defined to be $7x+2$.

This is different from, say, writing $$1 = \sin^2(\theta) + \cos^2(\theta)$$ where we are saying that the two sides are equal, but we are not defining "1" to be the expression "$\sin^2(\theta) + \cos^2(\theta)$".

Basically, some people think that there should be notational difference between saying "I define blah to be equal to blankety" and saying "blah is equal to blankety". So they use := for the first and = for the latter. Usually, it is clear from context which of the two uses of the equal sign is intended (often because of signal words like "Let", "We define", etc.)

• Are you sure it comes from CS? I study CS and see $:=$ mainly in maths/theory contexts. Programming languages use = and == nowadays. I have also seen $\leftarrow$ in the context of formal semantics, but hardly ever $:=$. – Raphael Mar 5 '11 at 23:24
• FORTRAN used = for assignment and .EQ. for comparison. ALGOL used := for assignment and = for comparison. I'm showing my age. – Ross Millikan Mar 6 '11 at 3:27
• @Raphael: Perhaps "computer programming" is a better description for what I had in mind, so I have changed it as such. As far as I am aware, it was indeed derived from certain computer languages that used := for assignment. – Arturo Magidin Mar 6 '11 at 5:02
• Other symbols I have seen used for "is defined to be equal to" are three horizontal lines instead of two, and $=$ with either a triangle or "def" written directly above it. I have seen variants of these used by people who predate widespread knowledge of computer programming. It would be interesting to know the earliest uses of a special symbol for this (and what symbols were chosen). An advantage of $:=$ is that it has a partner, $=:$, allowing it to distinguish which side is equal to the other by definition. Nine times out of ten it is the left, but the flexibility is nice. – anon Mar 6 '11 at 5:02
• I was aware of Pascal using :=, but not the others. I think it is possible that the language designers of that time where influenced by maths (as has happened a number of times), but := is so far the only easily typable symbol mentioned here, so it is perfectly reasonable to assume it stems from programming languages in the first place. For completeness, I have seen an older TCS-prof (former mathematician) use $=_{df}$ consistently. There might have been an e in there, but not legible. – Raphael Mar 6 '11 at 15:36

I think the Bourbaki used it first.. not sure.. I know physicists use $\equiv$

• I use $:=$ for definitions and $\equiv$ for identities. In the latter case, I think of the symbol as being $=$ with emphatic underline. :) (If it matters, I'm not a physicist.) – Blue Mar 19 '11 at 0:36
• $\equiv$ is indeed used by physicists as "is defined as". In modulo arithmetic it is also used as "is equivalent mod (integer subscript of $\equiv$)". For example, writing $8 \equiv_{3} 2$ means "8 is equivalent to 2 mod 3". It is also used to signify more general conruence relations. I would recommend that you not use $\equiv$ as an emphatic identity, @DayLateDon, to avoid confusion when sharing your work with others. – karmic_mishap Oct 25 '11 at 19:16
• @karmic_mishap: I picked up the "$\equiv$ for identity" thing from somewhere I can no longer remember. "Emphatic equals" is just how I explain it to myself. :) – Blue Oct 25 '11 at 21:28
• Come to think of confusion ... I recall years ago as a teacher writing "?" above the equals sign of a to-be-proven identity, and then post-proof, replacing "?" with "!". ("Are they equal? Indeed!") I'd seen this elsewhere, too. Of course, that's a particularly bad idea nowadays, with "!=" the modern shorthand for "not-equals". It's curious --and unfortunate-- that the symbol for emphasis became the symbol for negation. Granted, ASCII isn't the richest glyph set, and coders needed something, but why settle on the symbol that means in prose the exact opposite of what it means in code? Irony? – Blue Oct 25 '11 at 21:38
• @Blue I think != was chosen because it somehow resembled $\ne$ where ! "strikes through" =. – Ruslan Nov 18 '14 at 13:28