# Linear subspaces/Sum/Section
## Definition

For a $K$-vector space $V$ and a family of linear subspaces $U_{1},\ldots ,U_{n}\subseteq V$, we define the sum of these linear subspaces by
    $U_{1}+\cdots +U_{n}={\left\{u_{1}+\cdots +u_{n}\mid u_{i}\in U_{i}\right\}}\,.$
For this, we also write $\sum _{i=1}^{n}U_{i}$. The sum is again a linear subspace. In case
    $V=U_{1}+\cdots +U_{n}\,,$
we say that $V$ is the sum of the linear subspaces $U_{1},\ldots ,U_{n}$. The following theorem describes an important relation between the dimension of the sum of two linear subspaces and the dimension of their intersection.

## Theorem

Let $K$ denote a field, and let $V$ denote a $K$-vector space of finite dimension. Let $U_{1},U_{2}\subseteq V$ denote linear subspaces. Then
    $\dim _{K}{\left(U_{1}\right)}+\dim _{K}{\left(U_{2}\right)}=\dim _{K}{\left(U_{1}\cap U_{2}\right)}+\dim _{K}{\left(U_{1}+U_{2}\right)}\,.$

### Proof

Let $w_{1},\ldots ,w_{k}$ be a basis of $U_{1}\cap U_{2}$. On one hand, we can extend this basis, according to fact, to a basis $w_{1},\ldots ,w_{k},u_{1},\ldots ,u_{n}$ of $U_{1}$, on the other hand, we can extend it to a basis $w_{1},\ldots ,w_{k},v_{1},\ldots ,v_{m}$ of $U_{2}$. Then
    $w_{1},\ldots ,w_{k},u_{1},\ldots ,u_{n},v_{1},\ldots ,v_{m}$
is a generating system of $U_{1}+U_{2}$. We claim that it is even a basis. To see this, let
    $a_{1}w_{1}+\cdots +a_{k}w_{k}+b_{1}u_{1}+\cdots +b_{n}u_{n}+c_{1}v_{1}+\cdots +c_{m}v_{m}=0\,.$
This implies that the element
    $a_{1}w_{1}+\cdots +a_{k}w_{k}+b_{1}u_{1}+\cdots +b_{n}u_{n}=-c_{1}v_{1}-\cdots -c_{m}v_{m}\,$
belongs to $U_{1}\cap U_{2}$. From this, we get directly $b_{i}=0$ for $i=1,\ldots ,n$, and $c_{j}=0$ for $j=1,\ldots ,m$. From the equation before, we can then infer that also $a_{\ell }=0$ holds for all $\ell$. Hence, we have
linear independence. This gives altogether
    ${\begin{aligned}\dim _{K}{\left(U_{1}\cap U_{2}\right)}+\dim _{K}{\left(U_{1}+U_{2}\right)}&=k+k+n+m\\&=k+n+k+m\\&=\dim _{K}{\left(U_{1}\right)}+\dim _{K}{\left(U_{2}\right)}.\end{aligned}}$
$\Box$
The intersection of two planes (through the origin) in $\mathbb {R} ^{3}$ is "usually“ a line; it is the plane itself if the same plane is taken twice, but it is never just a point. This observation is generalized in the following statement.

## Corollary

Let $K$ be a field, and let $V$ be a $K$-vector space of dimension $n$. Let $U_{1},U_{2}\subseteq V$ denote linear subspaces of dimensions $\dim _{K}{\left(U_{1}\right)}=n-k_{1}$ and $\dim _{K}{\left(U_{2}\right)}=n-k_{2}$. Then
    $\dim _{K}{\left(U_{1}\cap U_{2}\right)}\geq n-k_{1}-k_{2}\,.$

### Proof

Due to fact, we have
    ${\begin{aligned}\dim _{K}{\left(U_{1}\cap U_{2}\right)}&=\dim _{K}{\left(U_{1}\right)}+\dim _{K}{\left(U_{2}\right)}-\dim _{K}{\left(U_{1}+U_{2}\right)}\\&=n-k_{1}+n-k_{2}-\dim _{K}{\left(U_{1}+U_{2}\right)}\\&\geq n-k_{1}+n-k_{2}-n\\&=n-k_{1}-k_{2}.\end{aligned}}$
$\Box$
Recall that, for a linear subspace $U\subseteq V$, the difference $\dim _{K}{\left(V\right)}-\dim _{K}{\left(U\right)}$ is called the codimension of $U$ in $V$. With this concept, we can paraphrase the statement above by saying that the codimension of an intersection of linear subspaces equals at most the sum of their codimensions.

## Corollary

Let a homogeneous system of linear equations with $k$ equations in $n$ variables be given. Then the dimension
$n-k$

### Proof

The solution space of one linear equation in $n$ variables has dimension $n-1$ or $n$. The solution space of the system is the intersection of the solution spaces of the individual equations. Therefore, the statement follows by applying fact to the individual solution spaces.
$\Box$