Tag Archives: set

Notation for sets

This is a revision of the section of abstractmath.org on notation for sets.

Sets of numbers

The following notation for sets of numbers is fairly standard.


  • Some authors use $\mathbb{I}$ for $\mathbb{Z}$, but $\mathbb{I}$ is also used for the unit interval.
  • Many authors use $\mathbb{N}$ to denote the nonnegative integers instead
    of the positive ones.
  • To remember $\mathbb{Q}$, think “quotient”.
  • $\mathbb{Z}$ is used because the German word for “integer” is “Zahl”.

Until the 1930’s, Germany was the world center for scientific and mathematical study, and at least until the 1960’s, being able to read scientific German was was required of anyone who wanted a degree in science. A few years ago I was asked to transcribe some hymns from a German hymnbook — not into English, but merely from fraktur (the old German alphabet) into the Roman alphabet. I sometimes feel that I am the last living American to be able to read fraktur easily.

Element notation

The expression “$x\in A$” means that $x$ is an element of the set $A$. The expression “$x\notin A$” means that $x$ is not an element of $A$.

“$x\in A$” is pronounced in any of the following ways:

  • “$x$ is in $S$”.
  • “$x$ is an element of $S$”.
  • “$x$ is a member of $S$”.
  • “$S$ contains $x$”.
  • “$x$ is contained in $S$”.


  • Warning: The math English phrase “$A$ contains $B$” can mean either “$B\in A$” or “$B\subseteq A$”.
  • The Greek letter epsilon occurs in two forms in math, namely $\epsilon$ and $\varepsilon$. Neither of them is the symbol for “element of”, which is “$\in$”. Nevertheless, it is not uncommon to see either “$\epsilon$” or “$\varepsilon$” being used to mean “element of”.
  • $4$ is an element of all the sets $\mathbb{N}$, $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$, $\mathbb{C}$.
  • $-5\notin \mathbb{N}$ but it is an element of all the others.

List notation

Definition: list notation

A set with a small number of elements may be denoted by listing the elements inside braces (curly brackets). The list must include exactly all of the elements of the set and nothing else.


The set $\{1,\,3,\,\pi \}$ contains the numbers $1$, $3$ and $\pi $ as elements, and no others. So $3\in \{1,3,\pi \}$ but $-3\notin \{1,\,3,\,\pi \}$.

Properties of list notation

List notation shows every element and nothing else

If $a$ occurs in a list notation, then $a$ is in the set the notation defines.  If it does not occur, then it is not in the set.

Be careful

When I say “$a$ occurs” I don’t mean it necessarily occurs using that name. For example, $3\in\{3+5,2+3,1+2\}$.

The order in which the elements are listed is irrelevant

For example, $\{2,5,6\}$ and $\{5,2,6\}$ are the same set.

Repetitions don’t matter

$\{2,5,6\}$, $\{5,2,6\}$, $\{2,2,5,6 \}$ and $\{2,5,5,5,6,6\}$ are all different representations of the same set. That set has exactly three elements, no matter how many numbers you see in the list notation.

Multisets may be written with braces and repeated entries, but then the repetitions mean something.

When elements are sets

When (some of) the elements in list notation are themselves sets (more about that here), care is required.  For example, the numbers $1$ and $2$  are not elements of the set \[S:=\left\{ \left\{ 1,\,2,\,3 \right\},\,\,\left\{ 3,\,4 \right\},\,3,\,4 \right\}\]The elements listed include the set $\{1, 2, 3\}$ among others, but not the number $2$.  The set $S$ contains four elements, two sets and two numbers. 

Another way of saying this is that the element relation is not transitive: The facts that $A\in B$ and $B\in C$ do not imply that $A\in C$. 

Sets are arbitrary

  • Any mathematical object can be the element of a set.
  • The elements of a set do not have to have anything in common.
  • The elements of a set do not have to form a pattern.
  • $\{1,3,5,6,7,9,11,13,15,17,19\}$ is a set. There is no point in asking, “Why did you put that $6$ in there?” (Sets can be arbitrary.)
  • Let $f$ be the function on the reals for which $f(x)=x^3-2$. Then \[\left\{\pi^3,\mathbb{Q},f,42,\{1,2,7\}\right\}\] is a set. Sets do not have to be homogeneous in any sense.

Setbuilder notation


Suppose $P$ is an assertion. Then the expression “$\left\{x|P(x) \right\}$” denotes the set of all objects $x$ for which $P(x)$ is true. It contains no other elements.

  • The notation “$\left\{ x|P(x) \right\}$” is called setbuilder notation.
  • The assertion $P$ is called the defining condition for the set.
  • The set $\left\{ x|P(x) \right\}$ is called the truth set of the assertion $P$.

In these examples, $n$ is an integer variable and $x$ is a real variable..

  • The expression “$\{n| 1\lt n\lt 6 \}$” denotes the set $\{2, 3, 4, 5\}$. The defining condition is “$1\lt n\lt 6$”.  The set $\{2, 3, 4, 5\}$ is the truth set of the assertion “n is an integer and $1\lt n\lt 6$”.
  • The notation $\left\{x|{{x}^{2}}-4=0 \right\}$ denotes the set $\{2,-2\}$.
  • $\left\{ x|x+1=x \right\}$ denotes the empty set.
  • $\left\{ x|x+0=x \right\}=\mathbb{R}$.
  • $\left\{ x|x\gt6 \right\}$ is the infinite set of all real numbers bigger than $6$.  For example, $6\notin \left\{ x|x\gt6 \right\}$ and $17\pi \in \left\{ x|x\gt6 \right\}$.
  • The set $\mathbb{I}$ defined by $\mathbb{I}=\left\{ x|0\le x\le 1 \right\}$ has among its elements $0$, $1/4$, $\pi /4$, $1$, and an infinite number of
    other numbers. $\mathbb{I}$ is fairly standard notation for this set – it is called the unit interval.

Usage and terminology

  • A colon may be used instead of “|”. So $\{x|x\gt6\}$ could be written $\{x:x\gt6\}$.
  • Logicians and some mathematicians called the truth set of $P$ the extension of $P$. This is not connected with the usual English meaning of “extension” as an add-on.
  • When the assertion $P$ is an equation, the truth set of $P$ is usually called the solution set of $P$. So $\{2,-2\}$ is the solution set of $x^2=4$.
  • The expression “$\{n|1\lt n\lt6\}$” is commonly pronounced as “The set of integers such that $1\lt n$ and $n\lt6$.” This means exactly the set $\{2,3,4,5\}$. Students whose native language is not English sometimes assume that a set such as $\{2,4,5\}$ fits the description.

Setbuilder notation is tricky

Looking different doesn’t mean they are different.

A set can be expressed in many different ways in setbuilder notation. For example, $\left\{ x|x\gt6 \right\}=\left\{ x|x\ge 6\text{ and }x\ne 6 \right\}$. Those two expressions denote exactly the same set. (But $\left\{x|x^2\gt36 \right\}$ is a different set.)

Russell’s Paradox

In certain areas of math research, setbuilder notation can go seriously wrong. See Russell’s Paradox if you are curious.

Variations on setbuilder notation

An expression may be used left of the vertical line in setbuilder notation, instead of a single variable.

Giving the type of the variable

You can use an expression on the left side of setbuilder notation to indicate the type of the variable.


The unit interval $I$ could be defined as \[\mathbb{I}=\left\{x\in \mathrm{R}\,|\,0\le x\le 1 \right\}\]making it clear that it is a set of real numbers rather than, say rational numbers.  You can always get rid of the type expression to the left of the vertical line by complicating the defining condition, like this:\[\mathbb{I}=\left\{ x|x\in \mathrm{R}\text{ and }0\le x\le 1 \right\}\]

Other expressions on the left side

Other kinds of expressions occur before the vertical line in setbuilder notation as well.


The set\[\left\{ {{n}^{2}}\,|\,n\in \mathbb{Z} \right\}\]consists of all the squares of integers; in other words its elements are 0,1,4,9,16,….  This definition could be rewritten as $\left\{m|\text{ there is an }n\in \mathrm{}\text{ such that }m={{n}^{2}} \right\}$.


Let $A=\left\{1,3,6 \right\}$.  Then $\left\{ n-2\,|\,n\in A\right\}=\left\{ -1,1,4 \right\}$.


Be careful when you read such expressions.


The integer $9$ is an element of the set \[\left\{{{n}^{2}}\,|\,n\in \text{ Z and }n\ne 3 \right\}\]It is true that $9={{3}^{2}}$ and that $3$ is excluded by the defining condition, but it is also true that $9={{(-3)}^{2}}$ and $-3$ is not an integer ruled out by the defining condition.


Sets. Previous post.


Toby Bartels for corrections.

Creative Commons License< ![endif]>

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

Send to Kindle


I have been working my way through abstractmath.org, revising the articles and turning them into pure HTML so they will be easier to update. In some cases I am making substantial revisions. In particular, many of the articles need a more modern point of view.


The math community’s understanding of sets and structures has changed because of category theory and will change
because of homotopy type theory.


This post considers some issues and possibilities concerning the chapter on sets.

The references listed at the end of the article include several about homotopy type theory. They provide different viewpoints and require different levels of sophistication.

A specification of the concept of set

The abmath article Specification of sets specifies what a set is in this way:

A set is a single math object distinct from but completely determined by what its elements are.

I have used this specification for sets since the eighties, first in my Discrete Math lecture notes and then in abstractmath.org. It has proved useful because it is quite simple and the statement implies lots of immediate consequences. Each of the first four consequences in this list below exposes a confusion that some students have.

Consequences of the specification

  1. A set is a math object. It has the same status as the number “$143$” and the sine function and the real line: they are all objects of math. A set is not merely a typographically convenient way to define a certain collection of things.
  2. A set is a single object. Many beginners seem to have in their head that the set $\{3,4\}$ is two things.
  3. A set is distinct from its elements. The set $\{3,4\}$ is not $3$, it is not $4$, it is not a number at all.
  4. The spec implies that $\{3,4\}$ is the same set as $\{4,3\}$. Some students think they understand this but some of their mistakes show that they don’t really understand it.
  5. On the other hand, $\{3,5\}$ is a different set from $\{3,4\}$. I haven’t noticed this bothering students but it bothers me. See the discussion on ursets below.

Those consequences make the spec a useful teaching tool. But if a beginning abstract math student gets very far in their studies, some complications come up.

Defining “set”

In the late nineteenth century, math people started formally defining particular math structures such as groups and various
kinds of spaces. This was normally done by starting with a set and adding structure.

You may think that “starting with a set and adding structure” brushes a lot of complications under the rug. Well, don’t look under the rug, at least not right now.

The way they thought about sets was a informal version of what is now called naive set theory. In particular, they freely defined particular sets using what is essentially setbuilder notation, producing sets in a way which (I claim) satisfies my specification.

Bertrand Russell wakes everyone up

Then along came Russell’s paradox. In the context of this discussion, the paradox implied that the spec for sets is not a definition.The spec provides a set of necessary conditions for being a set. But it is not sufficient. You can say “Let $S$ be the set of all sets that…[satisfy some condition]” until you are blue in the face, but there are conditions (including the empty condition) that don’t define a set.

The Zermelo-Fraenkel axioms

The Zermelo-Fraenkel axioms were designed to provide a definition that didn’t create contradictions. The axioms accomplish this by creating a sort of hierarchy that requires that each set must be defined in terms of sets defined previously. They provide a good way (but not the only one) of providing a way of legitimizing our use of sets in math.

Observe that the “set of all sets” is certainly not “defined” in terms of previously defined sets!

Sets as a foundation

During those days there was a movement to provide a solid foundation for mathematics. After Zermelo-Fraenkel came along, the progress of thinking seemed to be:

  1. Sets are in trouble.
  2. Zermelo-Fraenkel solves our set difficulties.
  3. So let’s require that every math object be a set.

That list is oversimplified. In particular, the development of predicate logic was essential to this approach, but I can’t write about everything at once.

This leads to monsters such as the notorious definition of ordered pair:

The ordered pair $(a,b)$ is the set $\{a,\{b\}\}$.

This leads to the ludicrous statement that $a$ is an element of $(a,b)$ but that $b$ is not.

By saying every math object may be modeled as a set with structure, ZF set theory becomes a model of all of math. This approach gives a useful proof that all of math is as consistent as ZF set theory is.

But many mathematicians jumped to the conclusion that every math object must be a set with structure. This approach does not match the way mathematicians think about math objects. In particular, it makes computerized proof assistance hard to use because you have to translate your thinking into sets and first order logic.

Sets by category theory

“A mathematical object is determined by the role it plays in a category.” — A. Grothendieck

In category theory, you define math structures in terms of how they relate to other math structures. This shifts the emphasis from

What is it?


What are its properties?

For example, an ordered pair is a mathematical object $p$ determined by these properties:

  • It determines mathematical objects $p_1$ and $p_2$.
  • $p$ is completely determined by what $p_1$ is and what $p_2$ is.
  • If $p$ and $q$ are ordered pairs and $p_1=q_1$ and $p_2=q_2$ then $p=q$.

Categorical definition of set

“Categorical” here means “as understood in category theory”. It unfortunately has a very different meaning in model theory (set of axioms with only one model up to isomorphism) and in general usage, as in “My answer is categorically NO” said by someone who is red in the face. The word “categorial” has an entirely different meaning in linguistics. *Sigh*.

William Lawvere has produced an axiomatization of the category of sets.
The most accessible introduction to it that I know of is the article Rethinking set theory, by Tom Leinster. This axiomatization defines sets by their relationship with each other and other math objects in much the same way as the categorical definition of (for example) groups gives a definition of groups that works in any category.

“Set” means two different things

The word set as used informally has two different meanings.

  • According to my specification of sets, $\{3,4\}$ is a set and so is $\{3,5\}$.
  • $\{3,4\}$ and $\{3,5\}$ are not the same set because they don’t have the same elements.
  • But in the category of sets, any two $2$-element sets are isomorphic. (So are any two seven element sets.)
  • From a categorical point of view, two isomorphic objects in a category can be be thought of as the same object, with a caveat that you have better make it clear which isomorphism you are thinking of.

One of the great improvements in mathematics that homotopy type theory supplies is a systematic way of keeping track of the isomorphisms, the isomorphisms between the isomorphisms, and so on ad infinitum (literally). But note: I am just beginning to understand htt, so regard this remark as something to be suspicious of.

  • But $\{3,4\}$ and $\{3,5\}$ may not be thought of as the same object according to the spec I gave, because they don’t have the same elements.
  • This means that the traditional idea of set is not the same as the strict categorical idea of set.

I suggest that we keep the word “set” for the traditional concept and call the strict categorical concept an urset.

A traditional set is a structure on an urset

The traditional set $\{3,5\}$ consists of the unique two-element urset coindexed on the integers.

A (ur)set $S$ coindexed by a math structure $A$ is a monic map from $S$ to the underlying set of $A$. In this example, the map has codomain the integers and takes one element of the two-element urset to $3$ and the other to $5$.

Note added 2014-10-05 in response to Toby Bartels’ comment: I am inclined to use the names “abstract set” for “urset” and “concrete set” for coindexed sets when I revise the articles on sets. But most of the time we can get away with just “set”.

There is clearly no isomorphism of coindexed sets from $\{3,4\}$ to $\{3,5\}$, so those two traditional sets are not equal in the category of coindexed sets.

I made up the phrase “coindexed set” to use in this sense, since it is a kind of opposite of indexed set. If terminology for this already exists, lemme know. Linguists will tell you they use the word “coindexed” in a different sense.


The concept of “element” in categorical thinking is very different from the traditional idea, where an element of a set can be any mathematical object. In categorical thinking, an element of an object $A$ of a category $\mathbf{C}$ is an arrow $1\to A$ where $1$ is the terminal object. Thus $4$ as an integer is the arrow $1\to \mathbb{Z}$ whose unique value is the number $4$.

An object is an element of only one set

In the usage of category theory, the arrow $1\to\mathbb{R}$ whose value is the real number $4$ is a different math object from the arrow $1\to\mathbb{Z}$ whose value is the integer $4$.

A category theorist will probably agree that we can identify the integer $4$ with the real number $4$ via the well known canonical embedding of the ring of integers into the field of real numbers. But in categorical thinking you have to keep all such embeddings in mind; you don’t say the integer $4$ is the same thing as the real number $4$. (Most computer languages keep them distinct, too.)

This difference is actually not hard to get used to and is in fact an improvement over traditional set theory. When you do category theory you use lots of commutative diagrams. The embeddings show up as monic arrows and are essential in keeping the different objects ($\mathbb{Z}$ and $\mathbb{R}$ in the example) separate.

The paper Relating first-order set theory and elementary toposes, by Awodey, Butz, Simpson and Streicher, introduces a concept of “structural system of inclusions” that appears to me to restore the idea of object being an element of more than one set for many purposes.

Homotopy type theory allows an object to have only one type, with much the same effect as in the categorical approach.

Variable elements

The arrow $1\to \mathbb{Z}$ that picks out the integer $4$ is a constant function. It is useful to think of any arrow $A\to B$ of any category as a variable element (or generalized element) of the object $B$. For example, the function $f:\mathbb{R}\to \mathbb{R}$ defined by $f(x)=x^2$ allows you to
think of $x^2$ as a variable number with real parameter. This is another way of thinking about the “$y$” in the equation $y=x^2$, which is commonly called a dependent variable.

One way to think about $y$ is that some statements about it are true, some are false, and many statements are neither true nor false.

  • $y\geq 0$ is true.
  • $y\lt0$ is false.
  • $y\leq1$ is neither true nor false.

This way of thinking about variable objects clears up a lot of confusion about variables and deserves to be more widely used in teaching.

The book Category theory for computing science provides some examples of the use of variable elements as a way of thinking about categorical ideas.


Creative Commons License< ![endif]>

This work is licensed under a Creative
Commons Attribution-ShareAlike 2.5

Send to Kindle

Dysfunctions in doing math II

This post continues Dysfunctions in doing math I, with some more revisions to the article in abstractmath on dysfunctions.


First Myth

MYTH: There are two kinds of mathematical objects: "sets" and "elements".

This is the TRUTH: Being an element is not a property that some math objects have and others don’t. “Element” is a binary relation; it relates an object and a set. So “$3$ is an element” means nothing, but “$3$ is an element of the set of integers” is true and relates two mathematical objects to each other.

Any mathematical object can be an element of a set
In particular, any set can be the
element of another set.


  • The number $42$ is not a set, but it is an element of the set $\{5,10,41,42,-30\}$.
  • The sine function is not a set, but it is an element of the set of all differentiable functions defined on the real numbers.
  • The set $\{1,2,5\}$ is a set, but it is also an element of the set $\left\{\{1,2,5\},\{3,5\}, \emptyset,\{42\}\right\}$. It is not an element of the set $\{1,2,3,4,5\}$.

If you find these examples confusing, read this.

Second Myth

MYTH: The empty set is an element of every set.

This is the TRUTH:
The empty set is an element of a set $S$ if and only if the definition of $S$ requires it to be an element.


  • The empty set is not an element of every set. It is not an element of the set $\{2,3\}$ for example; that set has only the elements $2$ and $3$.
  • The empty set is an element of the set $\{2,3,\emptyset\}$.
  • The empty set is a subset of every set.

Other ways to misunderstand sets

The myths just listed are explicit; students tell them to each other. The articles below tell you about other misunderstanding about sets which are usually subconscious.


An enthymeme is an argument based partly on unexpressed beliefs. Beginners at the art of writing proofs often produce enthymemes.


In the process of showing that the intersection of two equivalence relations $E$ and $E’$ is also an equivalence relation, a student may write “$E\cap E’$ is transitive because $E$ and $E’$ are transitive.”

  • This is an enthymeme; it omits stating, much less proving, that the intersection of transitive relations is transitive.
  • The student may “know” that it is obvious that the intersection of transitive relations is transitive, having never considered the similar question of the union of transitive relations.
  • It is very possible that the student possesses (probably subconsciously) a malrule to the effect that for any property $P$ the union or intersection of relations with property $P$ also has property $P$.
  • The instructor very possibly suspects this. For some students, of course, the suspicion will be unjustified, but for which ones?
  • This sort of thing is a frequent source of tension between student and instructor: “Why did you take points off because I assumed the intersection of transitive relations is transitive? It’s true!”


A malrule is an incorrect rule for syntactic transformation of a mathematical expression.


The malrule $\sqrt{x+y}=\sqrt{x}+\sqrt{y}$ invented by algebra students may come from the pattern given by the distributive law $a(x+y)=ax+ay$. The malrule invented by many first year calculus students that transforms $\frac{d(uv)}{dx}$ to $\frac{du}{dx}\frac{dv}{dx}$ may have been generated by extrapolating from the correct rule
\[\frac{d(u+v)}{dx}=\frac{du}{dx}+\frac{dv}{dx}\] by changing addition to multiplication. Both are examples of “every operation is linear”, which students want desperately to be true, although they are not aware of it.

Existential bigamy

Beginning abstract math students sometimes make a particular type of mistake that occurs in connection with a property $P$ of an mathematical object $x$ that is defined by requiring the existence of an item $y$ with a certain relationship to $x$. When students have a proof that assumes that there are two items $x$ and $x’$ with property $P$, they sometimes assume that the same $y$ serves for both of them. This mistake is called existential bigamy: The fact that Muriel and Bertha are both married (there is a person to whom Muriel is married and there is a person to whom Bertha is married) doesn’t mean they are married to the same person.


Let $m$ and $n$ be integers. By definition, $m$ divides $n$ if there is an integer $q$ such that $n=qm$. Suppose you are asked to prove that if $m$ divides both $n$ and $p$, then $m$ divides $n+p$. If you begin the proof by saying, “Let $n = qm$ and $p = qm$…” then you are committing existential bigamy.

You need to begin the proof this way: “Let $n = qm$ and $p = q’m…”$

Send to Kindle

Representing and thinking about sets

The interactive examples in this post require installing Wolfram CDF player, which is free and works on most desktop computers using Firefox, Safari and Internet Explorer, but not Chrome. The source code is the Mathematica Notebook Representing sets.nb, which is available for free use under a Creative Commons Attribution-ShareAlike 2.5 License. The notebook can be read by CDF Player if you cannot make the embedded versions in this post work.

Representations of sets

Sets are represented in the math literature in several different ways, some mentioned here.  Also mentioned are some other possibilities.  Introducing a variety of representations of any type of math object is desirable because students tend to assume that the representation is the object.

Curly bracket notation

The standard representation for a finite set is of the form "$\{1,3,5,6\}$". This particular example represents the unique set containing the integers $1$, $3$, $5$ and $6$ and nothing else. This means precisely that the statement "$n$ is an element of $S$" is true if $n=1$, $n=3$, $n=5$ or $n=6$, and it is false if $n$ represents any other mathematical object. 

In the way the notation is usually used, "$\{1,3,5,6\}$", "$\{3,1,5,6\}$", "$\{1,5,3,6\}$",  "$\{1,6,3,5,1\}$" and $\{ 6,6,3,5,1,5\}$ all represent the same set. Textbooks sometimes say "order and repetition don't matter". But that is a statement about this particular representation style for sets. It is not a statement about sets.

It would be nice to come up with a representation for sets that doesn't involve an ordering. Traditional algebraic notation is essentially one-dimensional and so automatically imposes an ordering (see Algebra is a difficult foreign language).    

Let the elements move

In Visible Algebra II, I experimented with the idea of putting the elements at random inside a circle and letting them visibly move around like goldfish in a bowl.  (That experiment was actually for multisets but it applies to sets, too.)  This is certainly a representation that does not impose an ordering, but it is also distracting.  Our visual system is attracted to movement (but not as much as a cat's visual system).  

Enforce natural ordering

One possibility would be to extend the machinery in a visible algebra system that allows you to make a box you could drag elements into. 

This box would order the elements in some canonical order (numerical order for numbers, alphabetical order for strings of letters or words) with the property that if you inserted an element in the wrong place it would rearrange itself, and if you tried to insert an element more than once the representation would not change.  What you would then have is a unique representation of the set.

An example is the device below.  (If you have Mathematica, not just CDF player, you can type in numbers as you wish instead of having to use the buttons.) 

This does not allow a representation of a heterogenous set such as $\{3,\mathbb{R},\emptyset,\left(\begin{array}{cc}1&2\\0&1\\ \end{array}\right)\}$.  So what?  You can't represent every function by a graph, either.

Hanger notation

The tree notation used in my visual algebra posts could be used for sets as well, as illustrated below. The system allows you to drag the elements listed into different positions, including all around the set node. If you had a node for lists, that would not be possible.

This representation has the pedagogical advantage of shows that a set is not its elements.

  • A set is distinct from its elements
  • A set is completely determined by what the elements are.

Pattern recognition

Infinite sets are sometimes represented using the curly bracket notation using a pattern that defines the set.  For example, the set of even integers could be represented by $\{0,2,4,6,\ldots\}$.  Such a representation is necessarily a convention, since any beginning pattern can in fact represent an infinite number of different infinite sets.  Personally, I would write, "Consider the even integers $\{0,2,4,6,\ldots\}$", but I would not write,  "Consider the set $\{0,2,4,6,\ldots\}$".

By the way, if you are writing for newbies, you should say,"Consider the set of even integers $\{0,2,4,6,\ldots\}$". The sentence "Consider the even integers $\{0,2,4,6,\ldots\}$" is unambiguous because by convention a list of numbers in curly brackets defines a set. But newbies need lots of redundancy.

Representation by a sentence

Setbuilder notation is exemplified by $\{x|x>0\}$, which denotes the positive reals, given a convention or explicit statement that $x$ represents a real number.  This allows the representation of some infinite sets without depending on a possibly ambiguous pattern. 

A Visible Algebra system needs to allow this, too. That could be (necessarily incompletely) done in this way:

  • You type in a sentence into a Setbuilder box that defines the set.
  • You then attach a box to the Setbuilder box containing a possible element.
  • The system then answers Yes, No, or Can't Tell.

The Can't Tell answer is a necessary requirement because the general question of whether an element is in a set defined by a first order sentence is undecidable. Perhaps the system could add some choices:

  • Try for a second.
  • Try for an hour.
  • Try for a year.
  • Try for the age of the universe.

Even so, I'll bet a system using Mathematica could answer many questions like this for sentences referring to a specific polynomial, using the Solve or NSolve command.  For example, the answer to the question, "Is $3\in\{n|n\lt0 \text{ and } n^2=9\}$?" (where $n$ ranges over the integers) would be "No", and the answer to  "Is $\{n|n\lt0 \text{ and } n^2=9\}$ empty?" would also be "No". [Corrected 2012.10.24]


  1. Explaining “higher” math to beginners (previous post)
  2. Algebra is a difficult foreign language (previous post)
  3. Visible Algebra II (previous post)
  4. Sets: Notation (abstractmath article)
  5. Setbuilder notation (Wikipedia)
Send to Kindle

Mathematical usage

Comments about mathematical usage, extending those in my post on abuse of notation.

Geoffrey Pullum, in his post Dogma vs. Evidence: Singular They, makes some good points about usage that I want to write about in connection with mathematical usage.  There are two different attitudes toward language usage abroad in the English-speaking world. (See Note [1])

  • What matters is what people actually write and say.   Usage in this sense may often be reported with reference to particular dialects or registers, but in any case it is based on evidence, for example citations of quotations or a linguistic corpus.  (Note [2].)  This approach is scientific.
  • What matters is what a particular writer (of usage or style books) believes about  standards for speaking or writing English.  Pullum calls this "faith-based grammar".  (People who think in this way often use the word "grammar" for usage.)  This approach is unscientific.

People who write about mathematical usage fluctuate between these two camps.

My writings in the Handbook of Mathematical Discourse and abstractmath.org are mostly evidence based, with some comments here and there deprecating certain usages because they are confusing to students.  I think that is about the right approach.  Students need to know what is actual mathematical usage, even usage that many mathematicians deprecate.

Most math usage that is deprecated (by me and others) is deprecated for a reason.  This reason should be explained, and that is enough to stop it being faith-based.  To make it really scientific you ought to cite evidence that students have been confused by the usage.  Math education people have done some work of this sort.  Most of it is at the K-12 level, but some have worked with college students observing the way the solve problems or how they understand some concepts, and this work often cites examples.

Examples of usage to be deprecated


Powers of functions

f^n(x) can mean either iterated composition or multiplication of the values.  For example, f^2(x) can mean f(x)f(x) or f(f(x)).  This is exacerbated by the fact that in undergrad calculus texts,  \sin^{-1}x refers to the arcsine, and \sin^2 x refers to \sin x\sin x.  This causes innumerable students trouble.  It is a Big Deal.


Set "in" another set.  This is discussed in the Handbook.  My impression is that for students the problem is that they confuse "element of" with "subset of", and the fact that "in" is used for both meanings is not the primary culprit.  That's because most sets in practice don't have both sets and non-sets as elements.  So the problem is a Big Deal when students first meet with the concept of set, but the notational confusion with "in" is only a Small Deal.


This is not a Big Deal.  But I have personally witnessed students (in upper level undergrad courses) that were confused by this.


The many uses of parentheses, discussed in abstractmath.  (The Handbook article on parentheses gives citations, including one in which the notation "(a,b)" means open interval once and GCD once in the same sentence!)  I think the only part that is a Big Deal, or maybe Medium Deal, is the fact that the value of a function f at an input x can be written either  "f\,x" or as "f(x)".  In fact, we do without the parentheses when the name of the function is a convention, as in \sin x or \log x, and with the parentheses when it is a variable symbol, as in "f(x)".  (But a substantial minority of mathematicians use f\,x in the latter case.  Not to mention xf.)  This causes some beginning calculus students to think "\sin x" means "sin" times x.


The examples given above are only a sampling of troubles caused by mathematical notation.   Many others are mentioned in the Handbook and in Abstractmath, but they are scattered.  I welcome suggestions for other examples, particularly at the college and graduate level. Abstractmath will probably have a separate article listing the examples someday…


[1] The situation Pullum describes for English is probably different in languages such as Spanish, German and French, which have Academies that dictate usage for the language.  On the other hand, from what I know about them most speakers of those languages ignore their dictates.

[2] Actually, they may use more than one corpus, but I didn't want to write "corpuses" or "corpora" because in either way I would get sharp comments from faith-based usage people.

References on mathematical usage

Bagchi, A. and C. Wells (1997), Communicating Logical Reasoning.

Bagchi, A. and C. Wells (1998)  Varieties of Mathematical Prose.

Bullock, J. O. (1994), ‘Literacy in the language of mathematics’. American Mathematical Monthly, volume 101, pages 735743.

de Bruijn, N. G. (1994), ‘The mathematical vernacular, a language for mathematics with typed sets’. In Selected Papers on Automath, Nederpelt, R. P., J. H. Geuvers, and R. C. de Vrijer, editors, volume 133 of Studies in Logic and the Foundations of Mathematics, pages 865  935.  

Epp, S. S. (1999), ‘The language of quantification in mathematics instruction’. In Developing Mathematical Reasoning in Grades K-12. Stiff, L. V., editor (1999),  NCTM Publications.  Pages 188197.

Gillman, L. (1987), Writing Mathematics Well. Mathematical Association of America

Higham, N. J. (1993), Handbook of Writing for the Mathematical Sciences. Society for Industrial and Applied Mathematics.

Knuth, D. E., T. Larrabee, and P. M. Roberts (1989), Mathematical Writing, volume 14 of MAA Notes. Mathematical Association of America.

Krantz, S. G. (1997), A Primer of Mathematical Writing. American Mathematical Society.

O'Halloran, K. L.  (2005), Mathematical Discourse: Language, Symbolism And Visual Images.  Continuum International Publishing Group.

Pimm, D. (1987), Speaking Mathematically: Communications in Mathematics Classrooms.  Routledge & Kegan Paul.

Schweiger, F. (1994b), ‘Mathematics is a language’. In Selected Lectures from the 7th International Congress on Mathematical Education, Robitaille, D. F., D. H. Wheeler, and C. Kieran, editors. Sainte-Foy: Presses de l’Université Laval.

Steenrod, N. E., P. R. Halmos, M. M. Schiffer, and J. A. Dieudonné (1975), How to Write Mathematics. American Mathematical Society.

Wells, C. (1995), Communicating Mathematics: Useful Ideas from Computer Science.

Wells, C. (2003), Handbook of Mathematical Discourse

Wells, C. (ongoing), Abstractmath.org.

Send to Kindle

More about defining “category”

In a recent post, I wrote about defining “category” in a way that (I hope) makes it accessible to undergraduate math majors at an early stage.  I have several more things to say about this.

Early intro to categories

The idea is to define a category as a directed graph equipped with an additional structure of composition of paths subject to some axioms.  By giving several small finite examples of categories drawn in that way that gives you an understanding of “category” that has several desirable properties:

  • You get the idea of what a category is in one lecture.
  • With the right choice of examples you get several fine points cleared up:
    • The composition is added structure.
    • A loop doesn’t have to be an identity.
    • Associativity is a genuine requirement —  it is not automatic.
  • You get immediate access to what is by far the most common notation used to work with a category — objects (nodes) and arrows.
  • You don’t have to cope with the difficult chunking required when the first examples given are sets-with-structure and structure-preserving functions.  It’s quite hard to focus on a couple of dots on the paper each representing a group or a topological space and arrows each representing a whole function (not the value of the function!).

Introduce more examples

Then the teacher can go on with the examples that motivated categories in the first place: the big deal categories such as sets, groups and topological spaces.   But they can be introduced using special cases so they don’t require much background.

  • Draw some finite sets and functions between them.  (As an exercise, get the students to find some finite sets and functions that make the picture a category with $f=kh$ as the composite and $f\neq g$.)
  • If the students have had calculus,  introduce them to the category whose objects are real finite nonempty intervals with continuous or differentiable mappings between them.  (Later you can prove that this category is a groupoid!)
  • Find all the groups on a two element set and figure out which maps preserve group multiplication.  (You don’t have to use the word “group” — you can simply show both of them and work out which maps preserve multiplication — and discover isomorphism!.)  This introduces the idea of the arrows being structure-preserving mape. You can get more complicated and use semigroups as well.  If the students know Mathematica you could even do magmas.  Well, maybe not.

All this sounds like a project you could do with high school students.

Large and small

If all this were just a high school (or intro-to-math-for-math-majors) project you wouldn’t have to talk about large vs. small.  However, I have some ideas about approaching this topic.

In the first place, you can define category, or any other mathematical object that might involve a proper class, using the syntactic approach I described in Just-in-time foundations.  You don’t say “A category consists of a set of objects and a set of arrows such that …”.  Instead you say something like “A category $\mathcal{C}$ has objects $A,\,B,\,C\ldots$ such that…”.

This can be understood as meaning “For any $A$, the statement $A$ is an object of  $\mathcal{C}$ is either true or false”, and so on.

This approach is used in the Wikibook on category theory.  (Note: this is a permanent link to the November 28 version of the section defining categories, which is mostly my work.  As always with Wikimedia things it may be entirely different when you read this.)

If I were dictator of the math world (not the same thing as dictator of MathWorld) I would want definitions written in this syntactic style.  The trouble is that mathematicians are now so used to mathematical objects having to be sets-with-structure that wording the definition as I did above may leave them feeling unmoored.  Yet the technique avoids having to mention large vs. small until a problem comes up. (In category theory it sometimes comes up when you want to quantify over all objects.)

The ideas outlined in this subsection could be a project for math majors.  You would have to introduce Russell’s Paradox.  But for an early-on intro to categories you could just use the syntactic wording and avoid large vs. small altogether.



Send to Kindle

Sets don't have to be homogeneous?

Colm Bhandal commented on my article on sets in abstractmath.org.

Let me first of all say that I am impressed with your website. It gave
me a few very good insights into set notation. Now, I’ll get straight
to the point. While reading your page, I came across a section
claiming that:

“Sets do not have to be homogeneous in any sense”

This confused me for a while, as I was of the opinion that all objects in a set were of the same type. After thinking about it for a while, I came to a conclusion:

A set defines a level of abstraction at which all objects are homogeneous, though they may not be so at other levels of abstraction.

Taking the example on your page, the set {PI^2, M, f, 42, -1/e^2} contains two irrational numbers, a matrix, a function, and a whole number. Thus, the elements are not homogeneous from one perspective (level of abstraction as I call it) in that they are spread across four known sets. However, in another sense they are homogeneous, in that they are all mathematical objects. Sure, this is a very high level of abstraction: A mathematical object could be a lot of things,
but it still allows every object in the set to be treated homogeneously i.e. as mathematical objects.

You are right.  I think I had better say “The elements of a set do not have to be ‘all of the same kind’ in the sense of that phrase in everyday speech.”  Of course, a mathematician would say the elements of a set S are “all of the same kind”, the “kind” being elements of S.
Apparently, according to the way our brains work, there are natural kinds and artificial kinds.  There is something going on in my students’ minds that cause them to be bothered by sets like that given about or even sets such as {1,3,5,6,7,9,11} (see the Handbook, page 279).   Philosophers talk about “natural kinds” but they seem to be referring to whether they exist in the world.  What I am talking about is a construct in our brain that makes “cat” a natural kind and “blue-eyed OR calico cat” an artificial kind.  Any teacher of abstract math knows that this construct exists and has to be overcome by talking about how sets can be arbitrary, functions can be arbitrary, and so on, and that’s OK.

 This distinction seems to be built into our brains.  A large part of abstractmath.org is devoted to pointing out the clashes between mathematical thinking and everyday thinking. 

Disclaimer:  When I say the distinction is “built into our brains” I am not claiming that it is or is not inborn; it may be a result of cultural conditioning. What seems most likely to me is that our brains are wired to think in terms of natural kinds, but culture may affect which kinds they learn.  Congnitive theorists have studied this; they call them “natural categories” and the study is part of prototype theory.  I seem to remember reading that they have some evidence that babies are born with the tendency to learn natural categories, but I don’t have a reference.

Send to Kindle