Motivation for Mathematical Grammar
Statements in advanced mathematics have a complicated structure that is easier to understand if one is familiar with mathematical grammar.
Unlike English grammar that can be ambiguous, mathematical grammar is precise.
4 Basic Concepts: Sets, Functions, Relations and Binary Operations
The word “is” can have multiple interpretations:
 5 is the square root of 25
 5 is less than 10
 5 is a prime number
Mathematically, we can have the following precise statements:
 \(5 = \sqrt{25}\)
 \(5 < 10\)
 \(5 \in P\)
… where \(P\) is a convention for prime numbers.
Some concepts, e.g. prime numbers, are not basic enough to have a universally recognized symbol.
Sets
Enumerating all elements is useful to denote small sets, e.g. \(\{2, 3, 5\}\). If the elements are too many but can be inferred, ellipses are useful, e.g. \(\{1, 2, 3, …, 100\}\) and \(\{2, 4, 6, 8, …\}\)
However, the most significant set denotation technique is via a property, e.g. \(\{x: x \mbox{ is} \mbox{ prime} \mbox{ and } x < 20\}\).
Sets via properties are useful when translating geometry objects into sets of points so that we can do algebra on them, e.g. \(\{(x, y) : x^2 + y^2 = 1\}\) is a circle of radius \(1\) centered at the origin.
Sets are also useful when defining new mathematical objects. Such objects tend to have a set together with a mathematical structure imposed on it.
Not sure what “mathematical structure” means, but the author promises to expound on this later on.
Sets are also useful in metamathematics (proving statements about the process of mathematical reasoning itself) because it is in principle possible to translate all mathematical arguments to sets.
Reminds me of how all things that we can do with fancy but classical laptops can also be done on a turing machine, albeit more slowly.
Functions
A function, \(f(x) = y\) is mathematical transformation that turns the object \(x\) into the object \(y\). The domain, \(A\), is the set of objects to be transformed, i.e. \( x \in A \). The range, \(B\), is the set of objects they’re allowed to be transformed into, i.e. \(y \in B\).
It helps to think of a function as an object, so that it having properties makes sense. Furthermore, many algebraic structures are most naturally thought of as sets of functions.
Is this a common trope in mathematics? Let’s imagine our object of interest is [an easier to interpret thing]. Now, it’s not 100% accurate, but thinking in such a way makes [more fundamental truth] easier to grasp.
Invertibility of Functions
Whether or not we can invert a function (i.e. undo its transformation) is interesting problem. There are two conditions for \(f\) to be invertible.
Injectivity
\(f\) must be an injection, i.e. \(f(x) \ne f(x')\) whenever \(x \ne x' \).
Suppose we want an inverse function \(g\) of \(f(x)\), which rounds \(x\) to the nearest \(100\), rounding up if \(x\) ends in \(50\). We’d need \(g(100) = 50, g(100) = 51, …, g(100) = 149 \), but \(g(100)\) cannot be more than one number at once!
General rule for functions. Every \(x \in A\) must map to exactly one \(f(x) \in B\). Different \(x_i\) may map to the same \(f(x)\) though, e.g. \(f(x) = x^2 \) is a valid function because given an \(x\), we know which \(y\) it’ll map to. However, \(f(x) = \sqrt{x}\) is not a function, e.g. given \(x = 4\), do we go to \(2\) or \(2\)?
Useful tests for injuctivity :
 No horizontal line cuts the graph of the function more than once.
 There is no information loss. Given a function’s output, we can determine the input.
Surjectivity
\(f\) must also be a surjection, i.e. every \(y \in B\) is equal to \(f(x)\) for some \(x \in A\). Simply put, we can do \(g(y) = x\).
Alternatively, every horizontal line crosses the graph of the function at least once.
Suppose \(f\) doubles a positive integer. Suppose we use \(f\) to differentiate odd and even numbers, by specifying odd numbers as those numbers \(n\) for which \(2x = n\) doesn’t have a solution. Although we can undo the doubling process by halving, the relationship is not symmetrical: there is no function that can be undone by doubling since doubling will never give an odd number.
I don’t fully understand the issue here… Functions need not be continuous.
The line \(y = 5\) does not cross the graph of \(f\).
Bijectivity
If \(f\) is both an injection and a surjection, then it’s a bijection. Bijections are precisely the functions that have inverses.
References

Abstract Math: Properties of functions. Charles Wells. abstractmath.org . Oct 26, 2007.
… and then we have statistics.