 So let's talk about groupings, or since group will actually have a very special meaning later on, let's get into the habit of not using the word group, unless we actually mean it, and so let's talk about associations. If a star b is an element of g, it's possible to use the product as an operand, and take another c in g as the second operand. And this gives us something we might write as a star b star c. It's important to understand that we must evaluate the operations from left to right. So in a star b star c, we must find a star b first, then take the result and star c with it. And we could write this as a star b in parentheses star c, where our parentheses have the usual meaning of do the stuff inside first, but it's important to recognize that we don't have to. When we write this, we mean take care of the first two things first. Now in some cases, we can regroup, I mean, reassociate the operands. For example, 5 plus 3 plus 7, where we take care of 5 plus 3 first, is the same as 5 plus 3 plus 7, where we take care of the 3 plus 7 first. But in other cases, we can't. 8 minus 2 minus 1 is not the same thing as 8 minus 2 minus 1. So if we require associativity, this gives us even more structure. And so we define a semi-group as an algebraic structure g star, where g is closed under star and star satisfies associativity. In particular, for all a, b, and c in g, a star b star c is the same as a star b star c. And important to remember, if it's not written down, it didn't happen. Note that semi-groups do not need to have the Latin square property, and quasi-groups do not need to have associativity. In practice, it's very, very, very hard to live without associativity, and this means we don't often talk about quasi-groups. Remember, our ultimate goal here is to be able to generalize this notion of solving an equation. So here's a standard rule of school algebra. You can do the same thing to both sides of inequality, and still have inequality. This is still true in abstract algebra, as long as we actually do the same thing. So for example, if I have x equals y, I'll star both sides with a, and notice that on the left hand side, we multiplied on the left by a. We need a good creative way to express this idea that we multiplied on the left by a. So how about we left multiplied by a? Now if we look on the right, we see that we multiplied by a, but this time a is on the right. So we need another good creative name to indicate that, and so we'll say that we about right multiplied by a. And here's the important thing. You can do the same thing to both sides of inequality, and still have inequality, but we didn't do the same thing. On the left, we left multiplied. On the right, we right multiplied, and since they aren't the same thing, equality isn't guaranteed. And so this brings to mind an important idea. If g star is an algebraic structure, we cannot assume a star b and b star a are the same thing. But if we are lucky, and they are the same, then we have the following definition. G star is a commutative algebraic structure, if for any a and b in g, a star b is the same as b star a. Don't jump your cue. Go back. Well, let's try to find a set of matrices so that m times is a semi-group, where times is ordinary matrix multiplication. And, since we're at it, is m times a commutative semi-group. So in order for m times to be a semi-group, we need closure under times and associativity. Since we need closure, we need a times b to have the same size as a or b. And so in order for that to happen, the matrices need to be square. And so let m be the set of, oh I don't know, we get to find any set that we want. How about 17 by 17 matrices? Under times, matrix multiplication, m times is definitely closed, and since matrix multiplication is associative, we know that m times is associative. And that fits the requirements for being a semi-group. But remember that in general, matrix multiplication is not in general commutative. And since in general a times b is not b times a, then m times is not a commutative semi-group. If we want to be able to do algebra, it's helpful to have a special element e, where e star x is x. And so we define, let g star be an algebraic structure, e is an identity if for all g and g, g star e is e star g is g. In other words, operating with e gives you what you started with. For example, suppose g star has the following Cayley table. Let's find if they exist all identity elements. So remember, definitions are the whole of mathematics. All else is commentary. Our definition of the identity tells us that the identity element should work whether it's on the left or on the right. So we see that a star a is a, a star b is b, and a star c is c. So it appears that a is an identity. However, we need to verify that it also works on the right. So we need to verify that b star a is b, and c star a is c, which it does. And so a is an identity. The presence of an identity gives us three new structures. We could have a magma with identity, a quasi group with an identity, and a semi group with an identity. Now, since magmas have so little structure, adding an identity doesn't really improve the situation. And since quasi groups lack associativity, they're hard to work with even if they have an identity. And so while we do have three new structures, only one of them is really useful. And that's a monoid, which is a semi group with an identity. For example, let e times be an algebraic structure where e is the set of even numbers and times is standard multiplication. Let's identify the type of structure. So if p and q are even numbers, their product p times q will also be even. So our set is closed under multiplication. And so since we have closure, e times is a magma. Let's go a little further. Since times is standard multiplication, we know it's associative. And since we have associativity, then e times is a semi group. Now the identity for multiplication is one, but one is not an element of e. It's not an even number. And since e times does not include the identity, it is not a monoid.