Here's some discussion of the mathematical idea of a group, from a college-level textbook titled simply Algebra,
by Michael Artin. [From chapter 2 (Groups), © 1991 Prentice-Hall.] Notice that the "set of invertible n x n matrices" and matrix multiplication are one type of group and one example of a law of composition, respectively:
"A group is a set on which a law of composition is
defined, such that all elements have inverses.
… For example, the set of nonzero
real numbers forms a group Rx under multiplication, and the set of all real
numbers forms a group R+
under addition. The set of invertible n
x n matrices, called the general linear group, is a very important example in
which the law of composition is matrix multiplication. We will see many more examples as we go
along.
By a law of composition on a
set S, we mean a rule for combining
pairs a,b of elements S to get another element, say p, of S. The original models for
this notion are addition and multiplication of real numbers. Formally, a law of composition is a function
of two variables on S, with values in
S, or [in other words] it is a map
S X S → S
a, b [squiggly arrow pointing right] p .
Here, S X S denotes, as always, the product set of pairs (a, b) of elements of S.
Functional notation p = f(a,b) isn’t very convenient for
laws of composition. Instead, the element
obtained by applying the law to a pair (a,b)
is usually denoted using a notation resembling those used for multiplication or
addition:
P = ab, a x b, a ° b, a + b, and so on,
a choice being made for the
particular law in question. We call the
element p the product or the sum of a and b, depending on the notation chosen.
Our first example of a law
of composition, and one of the two main examples, is matrix multiplication on
the set S of n x n matrices.
We will use the product
notation ab most frequently. Anything we prove with product notation can
be rewritten using another notation, such as addition. It will continue to be valid, because the
rewriting is just a change of notation.
It is important to note that
the symbol ab is a notation for a
certain element of S. Namely, it is the element obtained by
applying the given law of composition to the elements called a and b. Thus if the law is
multiplication of matrices and if
1 3 1 0 7 3
a= and b= , then ab
denotes the matrix
0 2 2 1 4 2 .
Once the product ab has been evaluated, the elements a and b cannot be
recovered from it.
Let us consider a law of composition written
multiplicatively as ab. It will be called associative if the rule
(ab)c =
a(bc) (associative law)
holds for all
a,b in S, and commutative if
ab =
ba (commutative law)
holds for all a,b
in S.
Our example of matrix multiplication is associative but not commutative.
When discussing groups in general, we will use
multiplicative notation. It is customary
to reserve additive notation a + b
for commutative laws of composition, that is, when a + b = b + a for all a,b. Multiplication carries no implication either
way concerning commutativity.
In additive notation the associative law is (a + b) + c = a + (b + c), and in
functional notation it is
f(f(a,b),
c) = f(a, f(b,c)).
This ugly formula illustrates the fact that
functional notation isn’t convenient for algebraic manipulation.
The associative law is more fundamental than the
commutative law; one reason for this is that composition of functions, our
second example of a law of composition, is associative." (end of Artin quotation)
After
showing how composition of functions is described mathematically and giving
examples, Artin notes “Composition of functions is not commutative.”
That’s enough group discussion for now. Oh, wait.
Three pages later, Artin gives the definition of a group, so I should
write that down:
Definition. A group is a set G together with a law of composition which is associative and has
an identity element, and such that every element of G has an inverse.