 Remember, a function is a mapping from one set to another. If our set is also a group, we might ask, can our mapping preserve the group operation? For example, suppose f maps the set of integers to the set of integers by being the function x squared. Let's find f of xy and compare it to f of x times f of y. And let's also compare f of x plus y to f of x plus f of y. So f of xy, well that's xy squared or x squared y squared, but f of x equals x squared and f of y equals y squared, so this is f of x f of y. On the other hand, f of x plus y is x plus y squared, and if we expand that out, we do see we have f of x here and f of y there, but we have this extra term, and so f of x plus y is not f of x plus f of y. And so we note that we had f of xy equals f of x times f of y, so the function preserved multiplication, but f of x plus y is not f of x plus f of y, so the function did not preserve addition. And this motivates the definition. Suppose g with operation plus and h with operation times are algebraic structures, and we have some function that maps elements of g to elements of h. f is a homomorphism if f of x plus y is f of x times f of y for all xy in our set g. In other words, our function preserves the operation in the two different groups. So consider our function that maps z to z by the operation x squared, and let's verify that it's a homomorphism under multiplication. So we saw that f of xy is xy squared, which is x squared y squared, which is f of x times f of y, and that fits our requirement. And so f is a homomorphism under multiplication. Since f is a function, we can also talk about its domain and range. Its domain has to be the group g. Its range f of g is the set of all elements f of g in h. Now when we're talking analysis, we talk about domain and range. When we talk about abstract algebra, we tend to use the term image and the notation f of g. And here's an important idea. While f of g, the image, is a subset of h, it might not be all of h. Now suppose f mapping g to h is a homomorphism. The question we might ask is, is the image a group? Now since the image is a subset of h, it shares all of the group operations and its properties, including associativity. And so we only need to verify that it has the identity, inverses, and closure. So suppose e h is the identity of h. We want to find an x in g where f of x is the identity in h. So let's think about this. Consider any element g of our group g. e h is the identity in h and f of g is an element of h. And so we must have e h times f g has to be f g and f g times e h has to be g. Now if e h is the image of some element f, it's f of x, and so we can replace it. And since f is a homomorphism, we know that f of x, f of g is f of x g. Similarly, f of g, f of x is the same as f of gx. So whatever x is, left multiplying by x and right multiplying by x has no effect on any element. So it's useful to remember if it walks like a duck, swims like a duck, and quacks like a duck, it's a duck. And in this case, whatever x is, certainly the identity will solve this equation. And so we know that if x is the identity of g, then f applied to the identity of g will give us the identity of h. Now we know from functions that if f of g is the range, it must be closed. So now let's check to see if we have inverses. So suppose h is an element of the image of g. And let's consider we want to find h inverse. So suppose h inverse is f applied to x, then we know that h, h inverse, should be the identity of h. And that means f of g, f of x, must be the identity. And because f is a homomorphism, that means f of gx is the identity. But we know that f of the identity itself is the identity of h. So one solution to this equation is to have gx be the identity in g. And because g is a group, we know that g inverse exists. And so we can solve this for x, giving us g inverse. So if h is in the image of g, then h is f applied to g for some g. And we find that h inverse is f applied to g inverse. And so that means that h inverse is also in the range. And if we put everything together, we have the following theorem. Let f be a function from g to h, and let it be a homomorphism. The range of f, again otherwise known as the image, is a subgroup of h, where f applied to the identity in g gives you the identity in h. And if f of g equals h, then f of g inverse is equal to h inverse.