# Linear mapping/Dimension formula/Rank/Section

The following statement is called dimension formula.

## Theorem

Let $K$ denote a field, let $V$ and $W$ denote $K$-vector spaces, and let
    $\varphi \colon V\longrightarrow W$
denote a $K$-linear mapping. Suppose that $V$ has finite dimension. Then
    $\dim _{\left(V\right)}=\dim _{\left(\operatorname {kern} \varphi \right)}+\dim _{\left(\operatorname {Im} \varphi \right)}\,$

### Proof

Set $n=\dim _{\left(V\right)}$. Let $U=\operatorname {kern} \varphi \subseteq V$ denote the kernel of the mapping and let $k=\dim _{\left(U\right)}$ denote its dimension ($k\leq n$). Let
    $u_{1},\ldots ,u_{k}$
be a basis of $U$. Due to fact, there exist vectors
    $v_{1},\ldots ,v_{n-k}$
such that
    $u_{1},\ldots ,u_{k},\,v_{1},\ldots ,v_{n-k}$
is a basis of $V$. We claim that
    $w_{j}=\varphi (v_{j}),\,j=1,\ldots ,n-k,$
is a basis of the image. Let $w\in W$ be an element of the image $\varphi (V)$. Then there exists a vector $v\in V$ such that $\varphi (v)=w$. We can write $v$ with the basis as
    $v=\sum _{i=1}^{k}s_{i}u_{i}+\sum _{j=1}^{n-k}t_{j}v_{j}\,.$
Then we have
    ${\begin{aligned}w&=\varphi (v)\\&=\varphi {\left(\sum _{i=1}^{k}s_{i}u_{i}+\sum _{j=1}^{n-k}t_{j}v_{j}\right)}\\&=\sum _{i=1}^{k}s_{i}\varphi (u_{i})+\sum _{j=1}^{n-k}t_{j}\varphi (v_{j})\\&=\sum _{j=1}^{n-k}t_{j}w_{j},\end{aligned}}$
which means that $w$ is a linear combination in terms of the $w_{j}$. In order to prove that the family $w_{j}$, $j=1,\ldots ,n-k$, is linearly independent, let a representation of zero be given,
    $0=\sum _{j=1}^{n-k}t_{j}w_{j}\,.$
Then
    $\varphi {\left(\sum _{j=1}^{n-k}t_{j}v_{j}\right)}=\sum _{j=1}^{n-k}t_{j}\varphi {\left(v_{j}\right)}=0\,.$
Therefore, $\sum _{j=1}^{n-k}t_{j}v_{j}$ belongs to the kernel of the mapping. Hence, we can write
    $\sum _{j=1}^{n-k}t_{j}v_{j}=\sum _{i=1}^{k}s_{i}u_{i}\,.$
Since this is altogether a basis of $V$, we can infer that all coefficients are $0$, in particular, $t_{j}=0$.
$\Box$

## Definition

Let $K$ denote a field, let $V$ and $W$ denote $K$-vector spaces, and let
    $\varphi \colon V\longrightarrow W$
denote a $K$-linear mapping. Suppose that $V$ has finite dimension. Then we call
    $\operatorname {rk} \,\varphi :=\dim _{\left(\operatorname {Im} \varphi \right)}\,$
$\varphi$
The dimension formula can also be expressed as
    $\dim _{\left(V\right)}=\dim _{\left(\operatorname {kern} \varphi \right)}+\operatorname {rk} \,\varphi \,.$

## Remark

Let $\varphi \colon V\rightarrow W$ be a linear mapping, where $V$ has finite dimension. The dimension formula can be illustrated with the following special cases. If $\varphi$ is the zero mapping, then $\operatorname {kern} \varphi =V$ and
    $\operatorname {rk} \,\varphi =0\,.$
If $\varphi$ is injective, then $\operatorname {kern} \varphi =0$ and
    $\operatorname {rk} \,\varphi =\dim _{\left(V\right)}\,.$
The Rank is always between $0$ and the dimension of the source space $V$. If $\varphi$ is surjective, then
    $\operatorname {rk} \,\varphi =\dim _{\left(W\right)}\,$
and
    $\dim _{\left(V\right)}=\dim _{\left(\operatorname {kern} \varphi \right)}+\dim _{\left(W\right)}\,.$

## Example

We consider the linear mapping
    $\varphi \colon \mathbb {R} ^{3}\longrightarrow \mathbb {R} ^{4},{\begin{pmatrix}x\\y\\z\end{pmatrix}}\longmapsto M{\begin{pmatrix}x\\y\\z\end{pmatrix}}={\begin{pmatrix}y+z\\2y+2z\\x+3y+4z\\2x+4y+6z\end{pmatrix}},$
given by the matrix
    $M={\begin{pmatrix}0&1&1\\0&2&2\\1&3&4\\2&4&6\end{pmatrix}}\,.$
To determine the kernel, we have to solve the homogeneous linear system
    ${\begin{pmatrix}y+z\\2y+2z\\x+3y+4z\\2x+4y+6z\end{pmatrix}}={\begin{pmatrix}0\\0\\0\\0\end{pmatrix}}\,.$
The solution space is
    $L={\left\{s{\begin{pmatrix}1\\1\\-1\end{pmatrix}}\mid s\in \mathbb {R} \right\}}\,,$
and this is the kernel of $\varphi$. The kernel has dimension one, therefore the dimension of the image is $2$, due to the dimension formula.

## Corollary

Let $K$ denote a field, let $V$ and $W$ denote $K$-vector spaces with the same dimension $n$. Let
    $\varphi \colon V\longrightarrow W$
denote a linear mapping. Then $\varphi$ is injective if and only if $\varphi$ is

### Proof

This follows from the dimension formula and fact.
$\Box$