Rather than just considering the different types of numbers, abstract algebra deals with the more general concept of sets: a collection of all objects (called elements) selected by property, specific for the set.
All collections of the familiar types of numbers are sets.
Other examples of sets
the set of all two-by-two matrices,
the set of all second-degree polynomials (ax2 + bx + c),
the set of all two dimensional vectors in the plane
and the various finite groups such as the cyclic groups which are the group of integers modulo n.
Set theory is a branch of logic and not technically a branch of algebra.
The notion of addition (+) is abstracted to give a binary operation, * say. The notion of binary operation is meaningless without the set on which the operation is defined.
- For two elements a and b in a set S a*b gives another element in the set; this condition is called closure.
Addition (+), subtraction (-), multiplication (×), and division (÷) can be binary operations when defined on different sets, as is addition and multiplication of matrices, vectors, and polynomials.
The numbers zero and one are abstracted to give the notion of an identity element for an operation.
- Zero is the identity element for addition and one is the identity element for multiplication.
- For a general binary operator * the identity element e must satisfy a * e = a and e * a = a. This holds for addition as a + 0 = a and 0 + a = a and multiplication a × 1 = a and 1 × a = a.
- However, if we take the positive natural numbers and addition, there is no identity element.
The negative numbers give rise to the concept of inverse elements. For addition, the inverse of a is -a, and for multiplication the inverse is 1/a.
- A general inverse element a-1 must satisfy the property that a * a-1 = e and a-1 * a = e. Associativity:
- For example: (2+3)+4=2+(3+4).
In general, this becomes (a * b) * c = a * (b * c).
This property is shared by most binary operations, but not subtraction or division or octonion multiplication.
Addition of integers also has a property called commutativity. That is, the order of the numbers to be added does not affect the sum.
- For example: 2+3=3+2. In general, this becomes a * b = b * a. Only some binary operations have this property.
- It holds for the integers with addition and multiplication, but it does not hold for matrix multiplication or quaternion multiplication .