# Serlo: EN: Cosets of a subspace

* ↳ Project "Serlo"
* ↳ Linear algebra Contents "Linear algebra" Vector spaces  Introduction: Vector space  Vector space  Vector space: properties  Proofs for vector spaces  Field as a vector space  Coordinate spaces  Sequence spaces  Function spaces  Subspace  Union and intersection of vector spaces  Sum of subspaces  Inner direct sum  Complements of vector spaces  Cosets of a subspace  Quotient space  Linear combinations, generators and bases  Linear maps  Matrices

## Derivation: coset or affine subspace
### Lines in $\mathbb {R} ^{2}$

You probably already know the concept of a straight line. But how do we describe a line in $\mathbb {R} ^{2}$ mathematically? You know from school that you can parameterise straight lines by $v+tu$, where $v,u\in \mathbb {R} ^{2},u\neq 0$ are two fixed vectors and $t$ takes all values in $\mathbb {R}$. That is, all points on the straight line form the set $G:=\{v+tu\mid t\in \mathbb {R} \}$. Geometrically described, this is the (infinitely long) line running through $v$ in the direction of $u$.
In general, a line does not pass through the origin $(0,0)$. Thus $G$ is not a subspace of $\mathbb {R} ^{2}$, since by definition every subspace contains the origin. However, the line $G$ is a displaced version of the line $U:=\{tu\mid t\in \mathbb {R} \}$ by the vector $v$. Here $U$ is a line passing through the origin. This is a subspace because it contains the origin and is closed under addition and scalar multiplication. That is, every straight line is given by the choice of a (one-dimensional) subspace $U\subset \mathbb {R} ^{2}$ and a vector $v\in \mathbb {R} ^{2}$. This justifies the notation $G=v+U$. This notation can also be formalised:
For a subspace $W$ consider a vector $v$. Let $v+W$ be by $v+W:=\{v+w\mid w\in W\}$. Then the following applies for the sets $G$ and $U$ defined above, that $G=\{v+tu\mid t\in \mathbb {R} \}=\{v+w\mid w\in U\}=v+U$.

### Planes in $\mathbb {R} ^{3}$

Let's increase the dimension and consider $\mathbb {R} ^{3}$. We can describe a line in analogy to the set $G:=\{v+tu\mid t\in \mathbb {R} \}$ with vectors $v$ and $u\in \mathbb {R} ^{3},u\neq 0$. This is a displaced version of a line through the origin by a vector $v$. So formally again, any line is of the form $v+U$ for a vector $v\in \mathbb {R} ^{3}$ and a one-dimensional subspace $U\subset \mathbb {R} ^{3}$.
What about the planes in $\mathbb {R} ^{3}$? We parameterise them by $v+t_{1}u_{1}+t_{2}u_{2}$, where $v,u_{1},u_{2}\in \mathbb {R} ^{3}$ are fixed vectors and $t_{1},t_{2}$ pass through all values in $\mathbb {R}$. The vectors $u_{1}$ and $u_{2}$ must not be scalar multiples of each other - otherwise we would get a line. All points on the plane form the set $E:=\{v+t_{1}u_{1}+t_{2}u_{2}\mid t_{1},t_{2}\in \mathbb {R} \}$. As in the case of lines, the plane $E$ is generally not a subspace, since the origin need not lie in $E$. However, the plane is a displaced version of the subspace $U:=\{t_{1}u_{1}+t_{2}u_{2}\mid t_{1},t_{2}\in \mathbb {R} \}$ by the vector $v$. It is therefore analogously true that every plane is given by a two-dimensional subspace and a vector, i.e. that $E=v+U$.

### Lines in $(\mathbb {Z} /5\mathbb {Z} )^{2}$

We can also look at certain straight lines in a more complicated space: We consider the $\mathbb {Z} /5\mathbb {Z}$-vector space $(\mathbb {Z} /5\mathbb {Z} )^{2}$. In the article vector space we have already seen that we can think of this vector space as regular points on a torus. Now what is a "straight line" on this torus? We have seen in the previous two sections how we can describe straight lines in the vector spaces $\mathbb {R} ^{2}$ and $\mathbb {R} ^{3}$: There a straight line is the same as a set $G=\{v+tu\mid t\in \mathbb {R} \}$ with a support vector $v$ and a direction vector $u$. In other words, it is the set $G=v+U$, where $U=\{tu\mid u\in \mathbb {R} \}$ is a one-dimensional subspace. We can transfer this construction to $(\mathbb {Z} /5\mathbb {Z} )^{2}$, that is, we can consider a straight line as $G=v+U$, where $U$ is a one-dimensional subspace of $(\mathbb {Z} /5\mathbb {Z} )^{2}$. That is, $G$ is of the form $G=\{v+tu\mid t\in \mathbb {Z} /5\mathbb {Z} \}$. We can visualise this set on a torus:
The points appear to lie on a line. If we connect the points each in the shortest way, we get a closed line that feels like a straight line on the torus.
Thus, displaced one-dimensional subspaces also correspond to straight lines here.
We consider another example of a straight line in $(\mathbb {Z} /5\mathbb {Z} )^{2}$. Consider the one-dimensional subspace $U:=\{n(1,1)\mid n\in \mathbb {Z} /5\mathbb {Z} \}$. We shift this by the vector $(2,0)\in (\mathbb {Z} /5\mathbb {Z} )^{2}$. Thus we obtain the line $G:=(2,0)+U$. Here a line consists of only five vectors. In our case $G=\{(2,0),(3,1),(4,2),(0,3),(1,4)\}$.
We have characterised geometric objects (e.g. lines and planes) as displaced subspaces in various vector spaces. Let's give them a name.

## Definition: coset or affine subspace

Definition (Affine subspace or coset)
Let $V$ be a $K$-vector space and $U$ a subspace of $V$, so $U\subseteq V$. Further let $v\in V$. Then, the set $v+U:=\{v+u\mid u\in U\}$ is called the affine subspace or coset obtained by translating $U$ by the vector $v$.

## Derivation: set of cosets of a subspace

We have defined cosets as displaced subspaces. Consider the following example of a displaced subspace $U$ of $\mathbb {R} ^{2}$ by two different vectors $v$ and $v'$:
In the example above, we see that different displacements of a subspace can lead to the same affine subspace. So we ask ourselves the following question:
When are two shifted subspaces $v+U$ and $v'+U'$ the same?
Let us first imagine the whole thing in $\mathbb {R} ^{2}$, where both shifted subspaces are lines. If they are equal, they have the same slope. This characterises the lines passing through the origin $U$ and $U'$. It follows that $U$ and $U'$ must be equal.
Let us now consider the question for general vector spaces. So let $V$ be a vector space, $U,U'\subseteq V$ be subspaces of vectors, $v,v'\in V$ be vectors, and let $v+U=v'+U'$ be sets. We would like to first conclude (as in $\mathbb {R} ^{2}$) that $U=U'$. To do this, it would be nice to get $U$ from $v+U$. This is done by taking all vectors of $v+U$ and subtracting $v$ , which indeed gives us $U$ . Hence, we can write $U$ as:
${\begin{aligned}U&=\{w-v\mid w\in v+U\}\\&{\color {OliveGreen}\left\downarrow \ v+U=v'+U'\right.}\\&=\{w-v\mid w\in v'+U'\}\\&{\color {OliveGreen}\left\downarrow \ w\in v'+U'\iff \exists u'\in U':w=v'+u'\right.}\\&=\{v'+u'-v\mid u'\in U'\}\\&=(v'-v)+U'\end{aligned}}$
Since $U$ is a subspace, we have $0\in U$. The above equation thus implies $0\in (v'-v)+U'$, i.e., there is a $u'\in U'$, such that $(v'-v)+u'=0$, i.e., $v'-v=-u'$. In particular, $v'-v\in U'$.
More generally, for each subspace $W$ and vector $w\in W$, we have $w+W=W$. The reason is that each $w'\in W$ can be written as $w'=w+(w'-w)$. Since $w'-w\in W$ , we have $w'\in w+W$. Geometrically, you can also imagine the whole thing like this: If you move the subspace $W$ in a direction in which it already lies, it is mapped onto itself.
Back to our original question: Since $v'-v\in U'$ , we know that $(v'-v)+U'=U'$. So all in all we get the desired $U=U'$. On the way we have also seen that $v'-v\in U'=U$ is also a necessary criterion for $v+U=v'+U'$.
Are these criteria also sufficient? Yes: Suppose we have $v,v'\in V$ and $U,U'\subset V$ with $U=U'$ and $v'-v\in U'=U$ . Then $U=U'=(v'-v)+U'$ and hence, by adding $v$ on both sides, we have $v+U=v'+U'$.
Let us summarise: Two shifted subspaces $v+U,v'+U'$ are equal exactly if the (non-shifted) subspaces are equal, i.e. $U=U'$, and the difference of the shifts lie in $U$ , i.e., $v-v'\in U$.
Given a subspace, we can now find out whether two displacements by $v$ or $v'$ give the same affine subspace. We can thus construct a kind of "new equality" by considering $v$ and $v'$ to be "equal" if they produce the same affine subspace. Such new equalities behave reasonably if they are equivalence relations.
Recall the definition of an equivalence relation.
Definition (Equivalence relation)
An equivalence relation is a homogeneous binary relation on a basic set that has the following properties:
* reflexive
* symmetric
* transitive
Two elements that are in relation with respect to an equivalence relation are called equivalent. If two elements $x$ and $y$ are equivalent to each other with respect to an equivalence relation $R$, one often writes $x\sim _{R}y$ or simply $x\sim y$.
To formally write down the "new equality" mentioned above, we define a relation $\sim$ given by $v\sim v':\iff v+U=v'+U\iff v-v'\in U$. Intuitively, our relation should be an equivalence relation, since it says when two shifted subspaces are equal. We now check this formally:
Theorem ($\sim$ is an equivalence relation)
The relation $\sim$ defined by $v\sim w\iff v-w\in U$ is an equivalence relation. This means that the relation is reflexive, symmetrical and transitive.
How to get to the proof? ($\sim$ is an equivalence relation)
To show the assertion, we need to verify the three axioms of an equivalence relation: reflexivity, symmetry and transitivity. For reflexivity, we have to show for all $v\in V$ that $v\sim v$ is satisfied. By definition of $\sim$ we must show that $v-v\in U$. Now $v-v=0$ and $U$ is a subspace. Therefore $v-v=0\in U$ and hence reflexivity holds.
For transitivity and symmetry we proceed in the same way: we insert the definition and infer the desired property from the fact that $U$ is a subspace.
Proof ($\sim$ is an equivalence relation)
Proof step: Reflexivity
Since $U$ is a subspace, we have $0\in U$. For an arbitrary vector $v\in V$ we have $0=v-v\in U$. By definition of the relation, it follows that $v\sim v$ for all $v\in V$.
Proof step: Symmetry
We want to show that from $v\sim w$ we can infer $w\sim v$ . So let $v\sim w$. Therefore, $v-w\in U$. As $U$ is a subspace, $U$ must be closed under taking inverses. So $-(v-w)\in U$. But this is equivalent to $w-v\in U$. Hence, $w\sim v$.
Proof step: Transitivity
Finally, we need to show that from $v\sim w$ and $w\sim z$ we get $v\sim z$. So let $v\sim w$, i.e., $v-w\in U$, and $w\sim z$, i.e., $w-z\in U$. Since $U$ is a subspace, $U$ must be closed under addition. So in particular $(v-w)+(w-z)\in U$. As $v-w+w-z=v-z$ we also have$v-z\in U$ and hence $v\sim z$.
We can now consider the equivalence classes of this relation, that is, to $v\in V$ we consider the set $[v]:=\{w\in V\mid v\sim w\}$. So the set$[v]$ consists of all vectors $w$, that displace $U$ to the same affine subspace $v+U$. How else can we characterise these equivalence classes? We have
$[v]=\{w\in V\mid v\sim w\}=\{w\in V\mid v-w\in U\}=\{v+u\mid u\in U\}=v+U$
That is, the equivalence classes of our relation are precisely the coset classes.
Just as we can look at an equivalence relation and its equivalence classes, we can also construct a space in which the "new equality" of the equivalence relation becomes a real equality. This is the set of equivalence classes to which we now want to give a special name.

## Definition: set of cosets of a subspace

Definition (Set of cosets of a subspace)
Let $V$ be a $K$-verctorspace and $U$ a subspace of $V$, so $U\subseteq V$. Further, let $v,w\in V$. Define $v\sim w:\iff v-w\in U$. Then, $\sim$ is an equivalence relation on $V$ and the Equivalence class of an element $v\in V$ is the set $v+U$. We call this the coset generated by $v$ with respect to $U$.
We define
$V/U:=\{v+U\mid v\in V\}$
to be the set of cosets of $U$.
We have defined the set of cosets $V/U$ as the set of equivalence classes according to $\sim$. In the last section we saw that the equivalence class generated by $v\in V$ is given exactly by the affine subspace $v+U$. Thus an equivalence class with respect to $\sim$ is the same as a displaced version of $U$. This provides two equivalent views of the set $V/U$: on the one hand, $V/U$ is the set of equivalence classes with respect to $\sim$; on the other hand, it is the set of displaced versions of $U$.
Hint
Depending on which of the two interpretations of the elements of $V/U$ one uses, one uses different names for the elements $v+U$ of $V/U$. If one uses the equivalence relation to divide the elements of $V$ into different sets, one speaks of cosets. If, on the other hand, one considers a displacement of $U$, one speaks of an affine subspace.

## Examples for cosets

Example (Physics: Change of potential energy)
We consider the three-dimensional space with a gravitational field on it, with a positive gravitational constant $g$.As coordinates, we use $x_{1}$, $x_{2}$ and $x_{3}$. Such a space can be, for example, the room where you are reading this article. We put our origin at some point on your table, so we define the potential energy at that point as 0. From that point, you can move an object to different points, assigning to each of those destination points the potential energy of a point particle we move there, which depends only on its height above the table. We can also take it to mean that we want to assign to each movement from the origin its change in potential energy. Let the table in our consideration be within the $x_{1}$-$x_{2}$- plane. The potential energy of a particle or the change of the potential energy by a movement from the origin to $(x_{1},x_{2},x_{3})^{T}$ is thus:
$E_{pot}=m\cdot g\cdot x_{3}$
We want to classify the possible rectilinear displacements from the origin based on their change in potential energy, and call two displacements equivalent if their change in the potential energy of a point particle matches. We want to group displacements into one class that change the potential energy in the same way. The mass, as well as the gravitational constant, are given for our point particle. Therefore, two displacements under consideration have the same potential energy if they have the same change in height. The displacements are therefore in the same class if their $x_{3}$-value matches.
Let us now abstract our illustrative example. Our space is the $\mathbb {R}$-vector space $\mathbb {R} ^{3}$. Mathematically, displacements from the origin are described by vectors. Displacements that cause the same change in potential energy for a point particle move it from the origin in $\mathbb {R} ^{3}$ to the same plane parallel to the $x_{1}$-$x_{2}$ plane, since exactly the point particles on this plane have the same potential energy. For a given change in potential energy, we can choose any of the vectors causing such a change as representatives.
In the chapter on subspaces we have already seen that the $x_{1}$-$x_{2}$-plane is a subspace $U$ of $\mathbb {R} ^{3}$. In our physical example, we saw that planes shifted along the $x_{3}$- axis were equivalence classes with respect to the change of potential energy. These classes are also called cosets.
Example (Finance: Change in the balance of two accounts)
Let us assume that each person always has exactly two bank accounts. Now we want to know how much money each person has in total. So we are interested in the sum of all the money each person has in their bank accounts. We look at the two bank accounts that Anna has. In these she has saved amounts of $A_{1}$ and $A_{2}$ respectively. So the total money saved by Anna is $A_{1}+A_{2}$.
Let us now consider two people, Emma and Fritz. Emma has on her accounts $E=(E_{1},E_{2})^{T}$. Fritz has on his accounts $F=(F_{1},F_{2})^{T}$. Emma and Fritz therefore have exactly the same amount of money if $E_{1}+E_{2}=F_{1}+F_{2}$. We call the pairs of accounts $(E_{1},E_{2})^{T}$ and $(F_{1},F_{2})^{T}$ equivalent if there is the same amount of money on them, i.e. if $E_{1}+E_{2}=F_{1}+F_{2}$.
With this definition, the following pairs of accounts are equivalent, for example:
${\begin{aligned}{\begin{pmatrix}700\\300\end{pmatrix}}{\text{ and }}{\begin{pmatrix}900\\100\end{pmatrix}}.\end{aligned}}$
The reason is $700+300=1000=900+100$.
The two accounts of Emma and Fritz are therefore equivalent if $E_{1}+E_{2}-(F_{1}+F_{2})=0$, i.e., $E_{1}-F_{1}+E_{2}-F_{2}=0$. We define the difference of the vectors $E$ and $F$ as
${\begin{aligned}{\begin{pmatrix}x\\y\end{pmatrix}}:={\begin{pmatrix}E_{1}-F_{1}\\E_{2}-F_{2}\end{pmatrix}}.\end{aligned}}$
The vectors $E$ and $F$ are equivalent if and only if $x+y=0$.
In other words, the sum of the funds from two accounts is given by the following linear map:
${\begin{aligned}f{\begin{pmatrix}x\\y\end{pmatrix}}=x+y\end{aligned}}$
Thus the kernel of $f$ is the set of pairs of accounts whose sum is zero. So two pairs of accounts are equivalent if they differ only by a vector of $\ker(f)$. We can further transform the kernel of $f$:
${\begin{aligned}\ker(f)=\left\{{\begin{pmatrix}x\\y\end{pmatrix}}{\bigg |}x+y=0\right\}=\left\{{\begin{pmatrix}a\\-a\end{pmatrix}}{\bigg |}a\in \mathbb {R} \right\}=\operatorname {span} \left(\left\{{\begin{pmatrix}1\\-1\end{pmatrix}}\right\}\right).\end{aligned}}$
The equivalence classes with respect to the sum of the account balances are thus exactly the coset classes modulo the subspace $U:=\operatorname {span} \left(\left\{(1,-1)^{T}\right\}\right)$. All cosets are of the form
${\begin{aligned}{\begin{pmatrix}a\\0\end{pmatrix}}+U\end{aligned}}$
with $a\in \mathbb {R}$.
We can also think of it like this: We want to look at the summed balance of the two accounts. In the process of summation, information on the single accounts is lost. We still know how much money a person has in total, but no longer how the money is distributed between the two accounts.
Example (Two switches for one light source)
We consider the following scenario: A hallway has two light switches, both of which are to control the ceiling lamp. For this purpose, one can use a multiway switching. We want to model the behaviour of this circuit using vector spaces.
We start with the light switches. Every light switch has two states: it points either up or down. So we can model it with $\mathbb {F} _{2}=\mathbb {Z} /2\mathbb {Z}$. The $0$ stands for the light switch in the upper position and the $1$ for the light switch in the lower position. When you flip the light switch, the state changes from $0$ to $1$ or from $1$ to $0$ – depending on the current position of the light switch. This change of state corresponds to the mathematical operation $+1$ within the field $\mathbb {F} _{2}$.
Now that we know how to model a light switch and the flipping of a light switch, we process all the input data of the multiway switching: these are the two light switches. We have four states, as each light switch has the state up ($0$) and down ($1$). Thus $\mathbb {F} _{2}^{2}$ is a suitable vector space for modelling the states. The state of the first light switch is given by the first component and the state of the second one by the second component. In this modelling, flipping the first light switch then corresponds to $+(1,0)^{T}$ and flipping the second light switch corresponds to $+(0,1)^{T}$. If both light switches are in the upper position (this corresponds to $(0,0)^{T}$) and we flip the first light switch, we arrive at the state $(0,0)^{T}+(1,0)^{T}=(1,0)^{T}$.
In order to extract the information from this model as to whether the lamp is on or off, we must first understand this circumstance with the multiway switching. The toggle switch allows us freedom at this point: We can build it in such a way that both switches have to be in the same position for the lamp to be on. We can also build it such that the lamp is on when the two switches are in different positions. For this example, we consider the case where the lamp is on exactly when both switches are in different positions. Thus we identify the states $(1,0)^{T}$ and $(0,1)^{T}$ with a lamp being on. We identify the other states $(0,0)^{T}$ and $(1,1)^{T}$ with a switched-off lamp. The latter form a subspace $U:=\{(0,0)^{T},(1,1)^{T}\}\subseteq \mathbb {F} _{2}^{2}$. If we shift this by $(1,0)^{T}$ or $(0,1)^{T}$, we get the states of a switched-on lamp $(1,0)^{T}+U$. These are all cosets of $U$ in $\mathbb {F} _{2}^{2}$. Thus we can summarise the alternating switch situation as follows: Given a switch state $v\in \mathbb {F} _{2}^{2}$, we get the information whether the lamp is on by determining the coset generated by $v$ in $\mathbb {F} _{2}^{2}/U$. If this is $U$, the lamp is off. If it is $(1,0)^{T}+U$, the lamp is on.
With this understanding of the lamp state, we can also describe the influence that flipping a switch has. Each of the operations $+(1,0)^{T}$ and $+(0,1)^{T}$ affects the lamp states $\mathbb {F} _{2}^{2}/U$ by changing the state of the lamp. If the lamp is in the off state $U$ and the second switch is flipped with $+(0,1)^{T}$, it is then in the on state $(0,1)^{T}+U=(1,0)^{T}+U$. If the first switch is now flipped, the lamp changes back to the switched-off state. Mathematically, this is represented by $(1,0)^{T}+((0,1)^{T}+U))=(1,1)^{T}+U=U$.

## Properties of equivalence classes applied to cosets

We have seen above that cosets of a one-dimensional subspace in $\mathbb {R} ^{2}$ are parallel straight lines. We can also explain this by characterising cosets as equivalence classes: Two equivalence classes, as sets, are either equal or disjoint. For us, this means that two cosets, i.e. two straight lines, are either equal or that they have no point of intersection. The latter means that they are parallel.
Furthermore, we know about equivalence classes that they cover the whole space, i.e. the union of all equivalence classes results in the whole set. From this we conclude that the union of all cosets (in our case parallel straight lines) gives the whole $\mathbb {R} ^{2}$. We can therefore decompose the vector space into the cosets - like leaves. This decomposition is also called a partition. So the cosets partition the vector space. In our example, this means that we can decompose the $\mathbb {R} ^{2}$ into displaced versions of an origin line $U$. This is illustrated in the following picture:
Both points mentioned also work in general (not only in $\mathbb {R} ^{2}$), since we have not used any property of $\mathbb {R} ^{2}$ in any of our arguments. It is therefore true for a vector space $V$ and a subspace $U$ that:
$V$ is the union of the cosets $U$ and any two cosets are disjoint.

## Outlook

Cosets occur when solving systems of linear equations: The solutions of the associated homogeneous system of equations $U$ form a subvector space. If the linear system of equations has a solution, the solutions form an affine subspace with respect to $U$.
Set a link as soon as the article on solving linear systems of equations is written..
Quotient space →
Den Bereich zur Analysis 1 gibt es jetzt auch als Buch! Bestelle dir dein Exemplar oder lade dir das Buch gleich kostenlos als PDF herunter:
Feedback? Do you want to join?
If you have questions concerning the content, or didn't understand something, the feel free to contact us! We would love to answer your questions! Also we are thankful for critics and/or comments! If you share our vision to explain university math in an comprehensible way, then contact us under:
E-Mail: en@serlo.org
This article is licensed under the free license CC-BY-SA 3.0. With that you can use it, modify it or share it freely, as long as you name „Serlo“ as source and put you changes under the same CC-BY-SA 3.0 oder an compatible license. On the page „Kopier uns!“ we explain you what you have to pay attention to, when using our texts, picture or videos.