A layman's introduction to groups

(An english translation of this post can be found after the portuguese version, here)
O objetivo deste post é introduzir o conceito de grupo de uma maneira que seja entendível por um aluno do secundário. Os grupos são objetos matemáticos cuja utilidade advém do nível de abstração que representam, em relação aos objetos matemáticos mais usuais, tais como:
  • os números inteiros, racionais e reais ($\mathbb{Z}, \mathbb{Q}, \mathbb{R}$);
  • as funções (reais de variável real) com a soma usual e composição de funções ($f \circ g$);
  • rotações e simetrias de polígonos regulares.
Tentaremos também justificar a importância da noção de grupo através de alguns resultados (simples) que provam a utilidade de considerar objetos abstratos.

Supõe-se que o leitor está minimamente familiarizado com os objetos da lista anterior, uma vez que uma das maneiras mais fáceis de introduzir a noção de grupo é ir comparando a teoria abstrata com objetos concretos e comuns.

Começamos por apresentar a definição formal de grupo, para que a possamos dissecar:

Definição: Um grupo é um par $(G, \star)$ tal que $G$ é um conjunto e $\star$ é uma operação binária $\star: G\times G \to G$. Adicionalmente, a operação $\star$ tem de ser associativa e o conjunto $G$ deve satisfazer
  • $\exists e \in G\ \forall g \in G: e\star g = g\star e = g$
  • $\forall g \in G\ \exists x \in G: g\star x = x\star g = e $
Pela definição de grupo, vemos que precisamos de um conjunto $G$ que nos vai dar os elementos do grupo e uma operação binária $\star$ que nos permite combinar dois elementos do grupo para obter um terceiro. Dizer que a operação é binária é o mesmo que dizer que a operação precisa de receber dois elementos para poder criar um terceiro.

Podemos pensar no conjunto $G$ como um saco cheio de objetos e a operação $\star$ permite que, quando tiramos dois objetos do saco, os saibamos combinar para formar um novo objeto do saco.

Exemplo: O par $(\mathbb{Z}, +)$ fornece um conjunto de objetos - os inteiros $\mathbb{Z}$ - e a soma usual de inteiros é uma operação que recebe dois inteiros e devolve um terceiro: $3 + 5 = 8, (-3) + 5 = 2, (-73) + 73 = 0$.

Por outro lado, exigir que a operação seja associativa quer dizer que
$$\forall x,y,z \in G: x\star(y\star z) = (x \star y)\star z$$
ou seja, quando precisamos de calcular o valor de $x \star y \star z$ não precisamos de nos preocupar com ter de começar por $x \star y$ ou por $y \star z$ porque o resultado final vai ser igual.

Exemplo: A soma usual de inteiros é, também, uma operação associativa: $3 + (5 + (-2)) = 3 + 3 = 6 = (3 + 5) + (-2)$

Depois de exigir a existência de um conjunto com elementos e de uma operação binária associativa, é necessário que sejam satisfeitas duas relações entre os elementos e a operação! A primeira,
$$\exists e \in G\ \forall g \in G: e\star g = g\star e = g$$
diz que deve existir um elemento no conjunto, chamemos-lhe $e$ ($\exists e \in G$), tal que: independentemente do outro elemento $g$ que se escolha ($\forall g \in G$), fazer a operação com $e$ e com $g$ é o mesmo que ter só o $g$ ($g\star e = e\star g = g$). A este elemento $e$ é usual chamar-se identidade.

Exemplo: Os inteiros com a soma vista anteriormente tem como identidade $e = 0 \in \mathbb{Z}$: $5 + 0 = 0 + 5 = 5, (-3) + 0 = 0 + (-3) = (-3)$.

A segunda relação que deve ser satisfeita,
$$\forall g \in G\ \exists x \in G: g\star x = x\star g = e$$
diz que, para qualquer elemento $g$ do conjunto ($\forall g \in G$) existe um elemento ($\exists x \in G$) que lhe está associado de uma maneira muito importante: usar a operação binária com $g$ e com o seu associado $x$ dá a identidade ($g \star x = x\star g = e$). A este elemento $x$, que está relacionado com $g$, costumamos chamar inverso de $g$, e geralmente representamos por $g^{-1}$. Note-se que isto é apenas uma questão de notação; ter $g^{-1}$ é o mesmo que ter em mãos um elemento que, quando combinado com $g$ (de qualquer um dos lados) dá a identidade do grupo.

Exemplo: Nos inteiros com a soma, o inverso de um número $g$ é o número $x$ tal que $g + x = e$, mas $e$, a identidade, é $0$, logo precisamos de $g + x = 0 \iff x = -g$ e portanto o inverso de $g$ é dado pelo seu simétrico: $4 + (-4) = 0, (-73) + (-(-73)) = 0$

Acabámos de interpretar a definição de grupo, e vimos que os inteiros com a sua soma satisfaziam todos os requisitos que estavam na definição, de onde podemos concluir que os inteiros com a soma são um grupo.

Nota: O par ($\mathbb{Z}, +$) é um grupo, mas o mesmo não se passa com ($\mathbb{Z}, -$), os inteiros com a subtração, ou ($\mathbb{Z}, \times$), os inteiros com a multiplicação. De facto, para o caso da subtração falha logo a associatividade:
$$1 - (2 - 3) = 1 - (-1) = 2 \neq -4 = (-1) - 3 = (1 - 2) - 3$$
Mas também podíamos ver que falhava a existência de identidade! $0$ não é a identidade para a subtração: enquanto $x - 0 = x$ para todo o número inteiro, não é sempre verdade que $0 - x = x$.
Para o caso da multiplicação, falha a existência de um inverso. Primeiro temos de notar que a identidade para os inteiros com a multiplicação é o $1: 1\times x = x \times 1 = x$. Se $g$ é um inteiro, então o seu inverso é um número $x$ tal que $g\times x = x\times g = 1$. Suponhamos então que $g = 3$. $g$ deveria ter um inverso no conjunto $G = \mathbb{Z}$, mas não tem, uma vez que $3x = 1 \iff x = \frac13$, e sabemos bem que $\frac{1}{3} \not \in \mathbb{Z}$.

Nota: Apesar de nem ($\mathbb{Z}, -$) nem ($\mathbb{Z}, \times$) serem grupos, podemos ver que tanto a identidade como os inversos podem ser muito diferentes quando mudamos as operações e/ou os conjuntos dos elementos.

Agora que já sabemos o que é um grupo e até já temos um exemplo de um grupo, vamos ilustrar a utilidade de considerar este objeto abstrato, demonstrando o seguinte teorema:

Teorema: Se ($G, \star$) é um grupo, então a identidade $e$ é única, bem como cada elemento $g \in G$ possui um único inverso $x$, com $g\star x = x\star g = e$.
Prova: supomos que $e$ e $e'$ são duas identidades e consideramos a expressão $e = e \star e'$ que é verdade, uma vez que $e'$ é identidade de $G$. Por outro lado, $e \star e' = e'$, uma vez que $e$ é identidade de $G$. Encadeando as duas igualdades, obtemos $e = e\star e' = e' \implies e = e'$ e a identidade é única.
Supomos agora que $x_1, x_2$ são dois inversos de $g$. Temos a igualdade $g\star x_1 = e = g\star x_2$; multiplicando o lado esquerdo das duas igualdades por $x_1$, já que este é inverso de $g$, obtemos:
$$\begin{align}g\star x_1 = e = g\star x_2 &\iff g\star x_1 = g\star x_2 \\ &\iff x_1\star (g\star x_1) = x_1\star (g\star x_2) \\ &\iff (x_1\star g)\star x_1 = (x_1\star g)\star x_2\ \ \text{(porque $\star$ é associativa)} \\ &\iff (e)\star x_1 = (e)\star x_2\ \ \text{(porque $x_1$ é inverso de $g$)} \\ &\iff x_1 = x_2\ \ \text{(porque $e$ é a identidade)}\end{align}$$
de onde decorre que o inverso de $g$ também é único. Note-se a generalidade deste resultado: nós não sabemos como é que, dado um grupo ($G, \star$), podemos encontrar a sua identidade ou os inversos dos seus elementos, mas sabemos que são únicos. Isto pode não parecer espetacular, mas o resultado que acábamos de provar é também dos resultados mais triviais que já vi em livros sobre este assunto. O leitor menos cético não deverá ter problemas em acreditar que existem muito mais resultados, e todos muito mais interessantes, que fazem uso desta abstração: preocupando-nos apenas com as propriedades intrínsecas dos elementos e da operação, conseguimos provar resultados que depois se aplicam numa variedade de casos concretos. A título de exemplo, aplicamos o resultado anterior num caso concreto:

Corolário: A função $i: \mathbb{R} \to \mathbb{R}, i(x) = x$ é a única função (bijetiva) real de variável real tal que, para qualquer outra função bijetiva $g: \mathbb{R} \to \mathbb{R}$, se tenha $i(g(x)) = g(i(x)) = g(x)\ \forall x \in \mathbb{R}$.
Prova: para provar esta asserção basta-nos mostrar que ($G, \circ$), onde $G$ é o conjunto de todas as funções bijetivas reais de variável real com a operação $\circ$ composição de funções é um grupo e, pelo teorema anterior, tem uma identidade única, que afirmamos ser a função $i(x) = x$. De facto, sabemos que a composição de funções é associativa já que
$$[f\circ(g\circ h)](x) = [f(g\circ h)](x) = f(g(h(x))) = [(f\circ g)](h(x)) = [(f\circ g)\circ h](x)$$
e portanto se as funções $f\circ(g\circ h)$ e $(f\circ g)\circ h$ têm o mesmo valor em todos os pontos, é porque são iguais. Temos também que existe uma identidade para a operação de composição, que segundo o nosso corolário será a função $i(x) = x$:
$$(i \circ g)(x) = i(g(x)) = g(x) = g(i(x)) = (g \circ i)(x)$$
de onde concluímos que $i$ é de facto uma identidade. Resta-nos mostrar que toda a função $f$ tem inverso, o que nos permitiria concluir que estamos de facto a trabalhar dentro de um grupo, e portanto a função $i$ é a única identidade. Seja $g \in G$ uma função bijetiva real de variável real. Definimos a sua inversa, $g^{-1}$, do seguinte modo:
$$g^{-1}(y) = x,\ \text{desde que}\ g(x) = y$$
O facto de $g$ ser sobrejetiva faz com que para todo o $y$ exista algum $x$ com $g(x) = y$ e a função $g$ ser injetiva faz com que esse $x$ seja único, portanto $g^{-1}$ está bem definida. É fácil de ver que $g^{-1}$ assim definida é, de facto, a inversa de $g$:
$$\begin{cases}g^{-1}(g(x)) = g^{-1}(y) = x = i(x)\\ g(g^{-1}(y)) = g(x) = y = i(y)\end{cases}$$
o que conclui que toda a função bijetiva tem inversa e portanto estamos a trabalhar com um grupo. Daqui decorre, imediatamente, que a função $i(x) = x$ é a única função bijetiva real de variável real tal que $g(i(x)) = i(g(x)) = x\ \forall x\in \mathbb{R}$.

Exemplo: Consideremos agora ($\mathbb{R}^\mathbb{R}, +$) o par onde $\mathbb{R}^\mathbb{R}$ representa todas as funções que vão de $\mathbb{R}$ para $\mathbb{R}$ (este conjunto tem mais funções que o conjunto $G$ anterior) e onde $+$ é a soma de funções usual (feita ponto por ponto, i.e. dadas duas funções $f, g: \mathbb{R} \to \mathbb{R}$, a função $f+g$ está definida como $(f+g)(x) = f(x) + g(x)$); o par anterior é um grupo.

A verificação deste facto é semelhante à verificação feita anteriormente, mas para este grupo temos que $z(x) = 0$ é a função identidade e a inversa da função $f$ é $-f$, já que $f(x) + (-f(x)) = 0$.

Terminamos por aqui a exposição; num próximo post trabalharemos um exemplo mais interessante e mais complexo, com simetrias, e exploraremos em mais profundidade a utilidade de trabalhar com grupos.


English version:
The purpose of this post is to introduce the concept of group in such a way that a regular high school student can understand it. Groups are mathematical objects whose utility lies in the abstraction they provide over the usual mathematical objects, such as
  • integer, rational and real numbers ($\mathbb{Z}, \mathbb{Q}, \mathbb{R}$);
  • functions with their usual sum and function composition ($f\circ g$);
  • rotations and reflections of regular polygons.
We will also try to justify the importance of considering something as abstract as groups by providing simple examples that hint at their usefulness.

We assume the reader is familiarized with the objects of the list shown, given that one of the easiest ways to introduce this abstract notion of group is through concrete examples.

We start by presenting the formal definition of a group, so we can work through it:

Definition: A group is a pair $(G, \star)$ such that $G$ is a set and $\star$ is a binary operation $\star: G \times G \to G$. Additionally, the operation $\star$ should be associative and the set $G$ should satisfy
  • $\exists e \in G\ \forall g \in G: e \star g = g\star e = g$
  • $\forall g \in G\ \exists x \in G: g \star x = x\star g = e$
From the definition of group one can see that the set $G$ is going to provide the elements of the group and the binary operation $\star$ will allow us to combine two elements into a third one. Saying that the operation $\star$ is binary is the same as saying that the operation needs to receive two elements to be able to create a third one.

We can think of the set $G$ as a bag full of objects and the operation $\star$ enables one to, upon removing two objects from the bag, create a new object out of them.

Example: The pair $(\mathbb{Z}, +)$ gives a set for the objects - the integers $\mathbb{Z}$ - and the usual sum of integers is an operation that takes two integers to create a third one: $3 + 5 = 8, (-3) + 5 = 2, (-73) + 73 = 0$.

On the other hand, enforcing the operation to be associative gives
$$\forall x, y, z \in G:x \star (y\star z) = (x\star y)\star z$$
that is, when we want to compute $x\star y\star z$ we don't need to worry about having to start with $x\star y$ or $y\star z$ because the final result will be the same.

Example: The usual sum of integers is also an associative operation: $3 + (5 + (-2)) = 3 + 3 = 6 = (3 + 5) + (-2)$

After requiring the existence of a set of elements and an associative binary operation, it is necessary that the elements of the set satisfy two relations regarding the operation. The first,
$$\exists e \in G\ \forall g \in G: e\star g = g\star e = g$$
says there should be an element in the set, call it $e$ ($\exists e \in G$) such that: regardless of the element $g$ you pick ($\forall g \in G$), applying the operation with $e$ and with $g$ is the same as just having $g$ ($g \star e = e \star g = g$). We usually call identity to this element.

Example: The integers with integer addition as we saw above has identity $e = 0 \in \mathbb{Z}$: $5 + 0 = 0 + 5 = 5, (-3) + 0 = 0 + (-3) = (-3)$.

The second relation to be satisfied,
$$\forall g \in G\ \exists x \in G: g\star x = x\star g = e$$
says that any element $g$ from the set ($\forall g \in G$) should have an element associated with it in a very special way: applying the binary operation to $g$ and to its associate $x$ gives the identity ($g \star x = x \star g = e$). To this element $x$, associated with $g$, we call inverse of $g$, and we usually represent it as $g^{-1}$. Note that this is just notation; writing $g^{-1}$ means we are talking about the very specific element that, when combined with $g$ (from either side) gives the identity of the group.

Example: In the integers with the regular sum, the inverse of an integer $g$ is an integer $x$ such that $g + x = e$, but $e$, the identity, is $0$, therefore we need $g + x = 0 \iff x = -g$ and so the inverse of $g$ is given by its symmetric: $4 + (-4) = 0, (-73) + (-(-73)) = 0$

Given that we just interpreted the definition of a group and we saw that the integers satisfy all the requisits, we conclude that the integers with the usual sum form a group.

Remark: The pair ($\mathbb{Z}, +$) is a group but the same cannot be said of ($\mathbb{Z}, -$), the integers with the usual subtraction, or ($\mathbb{Z}, \times$), the integers with multiplication. In fact, for subtraction not even associativity holds:
$$1 - (2 - 3) = 1 - (-1) = 2 \neq -4 = (-1) - 3 = (1 - 2) - 3$$
But we could see that there is also no identity! $0$ is not the identity for the operation of subtraction: while $x - 0 = x$ for any integer, it is not always true that $0 - x = x$.
For the multiplication, there is no inverse. First note that the identity for the integers with multiplication is $1: 1\times x = x \times 1 = x$. If $g$ is an integer, then its inverse is a number $x$ such that $g\times x = x\times g = 1$. Set $g = 3$. $g$ should have an inverse in the set $G = \mathbb{Z}$, but it does not, given that $3x = 1 \iff x = \frac13$ and we are well aware that $\frac{1}{3} \not \in \mathbb{Z}$.

Remark: Even though neither ($\mathbb{Z}, -$) nor ($\mathbb{Z}, \times$) were groups, we could verify that changing the sets and/or the operations can change the identity/the inverses of the group.

Now that we know what a group is and we even have an example of a group we will try to motivate this abstract object by proving the following theorem:

Theorem: If ($G, \star$) is a group, then the identity $e$ is unique; at the same time, any $g \in G$ has a unique inverse $x$, with $g\star x = x\star g = e$.
Proof: assume $e$ and $e'$ are two distinct identities and consider the equality $e = e\star e'$, which holds because $e'$ is an identity in $G$. On the other hand, $e \star e' = e'$, given that $e$ is an identity in $G$. Chaining the two equalities yields $e = e\star e' = e' \implies e = e'$ and thus the identity is unique.
Now we suppose $x_1, x_2$ are two inverses of $g$. We have the equality $g\star x_1 = e = g\star x_2$; multiplying on the left by $x_1$ we get:
$$\begin{align}g\star x_1 = e = g\star x_2 &\iff g\star x_1 = g\star x_2 \\ &\iff x_1\star (g\star x_1) = x_1\star (g\star x_2) \\ &\iff (x_1\star g)\star x_1 = (x_1\star g)\star x_2\ \ \text{(because $\star$ is associative)} \\ &\iff (e)\star x_1 = (e)\star x_2\ \ \text{(because $x_1$ is an inverse of $g$)} \\ &\iff x_1 = x_2\ \ \text{(because $e$ is the identity)}\end{align}$$
from which the uniqueness of the inverse follows. Note how general this result is: we do not know how to take a group $(G, \star)$ and find its identity or the inverses of its elements, but we know they are unique. This may not seem like a great feat, but the result that was just proven is one of the most trivial facts that I have seen in books about this subject. The not-so-skeptical reader should not have any problem in believing that there is a plethora of extraordinarily interesting results that rely on this power of abstraction: by focusing solely on the intrinsic properties of the elements and the operation, we can prove results that apply in a variety of situations. To support this statement, we apply the previous result to a specific example:

Corollary: The function $i: \mathbb{R} \to \mathbb{R}, i(x) = x$ is the only real-valued (bijective) function that, for any other bijective function $g: \mathbb{R} \to \mathbb{R}$, satisfies $i(g(x)) = g(i(x)) = g(x)\ \forall x \in \mathbb{R}$.
Proof: to prove this statement it suffices to show that ($G, \circ$), where $G$ is the set of all real-valued bijective functions, with the operation of function composition $\circ$ is a group, which by the previous theorem has a unique identity that we claim to be the function $i(x) = x$. As a matter of fact, function composition is associative, given that
$$[f\circ(g\circ h)](x) = [f(g\circ h)](x) = f(g(h(x))) = [(f\circ g)](h(x)) = [(f\circ g)\circ h](x)$$
and if the functions $f\circ(g\circ h)$ and $(f\circ g)\circ h$ agree on every point, then they are the same. We also have the existence of an identity for the operation of function composition which, by our corollary, should be the function $i(x) = x$:
$$(i \circ g)(x) = i(g(x)) = g(x) = g(i(x)) = (g \circ i)(x)$$
from where we conclude that $i$ is, in fact, the identity. We are left with showing that every function $f \in G$ has an inverse, which will conclude the proof that we are working with a group, which in turn would imply that $i$ is the only identity. Let $g\in G$ be a real-valued bijective function. We define its inverse, $g^{-1}$, as follows:
$$g^{-1}(y) = x,\ \text{as long as}\ g(x) = y$$
Because $g$ is surjective we know that for any $y$ there exists some $x$ with $g(x) = y$; the fact that $g$ is injective guarantees the uniqueness of said $x$, thus $g^{-1}$ is well-defined. It is fairly easy to verify that $g^{-1}$ defined as such is the inverse of $g$:
$$\begin{cases}g^{-1}(g(x)) = g^{-1}(y) = x = i(x)\\ g(g^{-1}(y)) = g(x) = y = i(y)\end{cases}$$
therefore every bijective function has an inverse and thus we are working with a group. It follows immediately that $i(x) = x$ is the only real-valued bijective function that satisfies $g(i(x)) = i(g(x)) = x\ \forall x\in \mathbb{R}$.

Example: Now we consider ($\mathbb{R}^\mathbb{R}, +$) where $\mathbb{R}^\mathbb{R}$ represents all functions from $\mathbb{R}$ to $\mathbb{R}$ (this set has more functions than the previous set $G$) and where $+$ represents the usual pointwise function addition, i.e. for $f, g: \mathbb{R} \to \mathbb{R}$, we define $f+g$ as $(f+g)(x) = f(x) + g(x)$); this pair is a group.

Verifying this amounts to some calculations similar to the ones done above; even so, for this group we have that the identity is the function $z(x) = 0$ and the inverse of a function $f$ is $-f$, since $f(x) + (-f(x)) = 0$.

We end our post here; in the future we shall explore (extensively) a more interesting example with symmetries, and will explore in more depth the utility of dealing with groups.


Let me know what you think!

-RGS

Popular posts from this blog

Tutorial on programming a memory card game

Markov Decision Processes 01: the basics

The hairy ball theorem and why there is no wind (somewhere) on Earth