# Linear algebra/K/Homomorphism space/Introduction/Section
## Definition

Let $K$ be a field, and let $V$ and $W$ be $K$-vector spaces. Then
    $\operatorname {Hom} _{K}{\left(V,W\right)}={\left\{f:V\rightarrow W\mid f{\text{ linear mapping}}\right\}}\,$
is called the space of homomorphisms. It is endowed with the addition defined by
    $(f+g)(v):=f(v)+g(v)\,,$
and the scalar multiplication defined by
    $(\lambda f)(v):=\lambda \cdot f(v)\,.$
Due to exercise, this is indeed a $K$-vector space.

## Example

Let $W$ be a $K$-vector space over the field $K$. Then the mapping
    $\operatorname {Hom} _{K}{\left(K,W\right)}\longrightarrow W,\varphi \longmapsto \varphi (1),$
is an isomorphism of vector spaces, see exercise.

## Lemma

Let $K$ be a field, and let $V$ and $W$ be
$K$
* A linear mapping from another vector space $U$ induces a linear mapping
    $\varphi \colon U\longrightarrow V$
    $\operatorname {Hom} _{K}{\left(V,W\right)}\longrightarrow \operatorname {Hom} _{K}{\left(U,W\right)},f\longmapsto f\circ \varphi .$
* A linear mapping to another vector space $T$ induces a linear mapping
    $\psi \colon W\longrightarrow T$
    $\operatorname {Hom} _{K}{\left(V,W\right)}\longrightarrow \operatorname {Hom} _{K}{\left(V,T\right)},f\longmapsto \psi \circ f.$

### Proof

$\Box$

## Lemma

Let $V$ be a $K$-vector space together with a direct sum decomposition
    $V=U_{1}\oplus U_{2}\,.$
Let $W$ be another $K$-vector space and let
    $\varphi _{1}\colon U_{1}\longrightarrow W$
and
    $\varphi _{2}\colon U_{2}\longrightarrow W$
denote linear mappings. Then we get, by setting
    $\varphi (v):=\varphi _{1}(v_{1})+\varphi _{2}(v_{2})\,,$
where $v=v_{1}+v_{2}$ is the direct decomposition, a linear mapping
    $\varphi \colon V\longrightarrow W.$

### Proof

The mapping is well-defined, since the representation $v=v_{1}+v_{2}$ with $v_{1}\in U_{1}$ and $v_{2}\in U_{2}$ is unique. The linearity follows from
    ${\begin{aligned}\varphi (av+bv')&=\varphi _{1}{\left((av+bv')_{1}\right)}+\varphi _{2}{\left((av+bv')_{2}\right)}\\&=\varphi _{1}{\left(av_{1}+bv'_{1}\right)}+\varphi _{2}{\left(av_{2}+bv'_{2}\right)}\\&=a\varphi _{1}(v_{1})+b\varphi _{1}(v'_{1})+a\varphi _{2}(v_{2})+b\varphi _{2}(v'_{2})\\&=a\varphi _{1}(v_{1})+a\varphi _{2}(v_{2})+b\varphi _{1}(v'_{1})+b\varphi _{2}(v'_{2})\\&=a\varphi (v)+b\varphi (v')\end{aligned}}$
$\Box$

## Lemma

Let $K$ be a field, and let $V$ and $W$ be $K$-vector spaces. Let
    $V=V_{1}\oplus \cdots \oplus V_{n}\,$
and
    $W=W_{1}\oplus \cdots \oplus W_{m}\,$
de direct sum decompositions and let
    $p_{j}\colon W\longrightarrow W_{j}$
denote the canonical projections. Then the mapping
    $\operatorname {Hom} _{K}{\left(V,W\right)}\longrightarrow \prod _{1\leq i\leq n,\,1\leq j\leq m}\operatorname {Hom} _{K}{\left(V_{i},W_{j}\right)},f\longmapsto p_{j}\circ {\left(f{|}_{V_{i}}\right)},$
is an isomorphism. If we consider $\operatorname {Hom} _{K}{\left(V_{i},W_{j}\right)}$ as linear subspaces of $\operatorname {Hom} _{K}{\left(V,W\right)}$, then we have the direct sum decomposition
    $\operatorname {Hom} _{K}{\left(V,W\right)}\cong \bigoplus _{1\leq i\leq n,\,1\leq j\leq m}\operatorname {Hom} _{K}{\left(V_{i},W_{j}\right)}\,.$

### Proof

It follows directly from fact that the given mapping is linear. In order to prove injectivity, let $f\in \operatorname {Hom} _{K}{\left(V,W\right)}$ with $f\neq 0$ be given. Then there exists some $v\in V$ such that
    $f(v)\neq 0\,.$
Let $v=v_{1}+\cdots +v_{n}$ with $v_{i}\in V_{i}$. Then also $f(v_{i})\neq 0$ for some $i$. Therefore, $(f(v_{i}))_{j}\neq 0$ for some $j$. Hence
    $f_{ij}=p_{j}\circ {\left(f{|}_{V_{i}}\right)}\neq 0\,.$
In order to prove surjectivity, let a family of homomorphisms $f_{ij}\in \operatorname {Hom} _{K}{\left(V_{i},W_{j}\right)},\,1\leq i\leq n,\,1\leq j\leq m$, be given, which we consider as mappings to $W$. Then the
    $f_{i}=\sum _{j=1}^{m}f_{ij}\,$
are linear mappings from $V_{i}$ to $W$. This yields via fact a linear mapping $\sum _{i=1}^{n}f_{i}$ from $V$ to $W$, which restricts to the given mappings.
$\Box$

## Theorem

Let $K$ denote a field and let $V$ and $W$ denote finite-dimensional $K$-vector spaces. Let ${\mathfrak {v}}=v_{1},\ldots ,v_{n}$ be a basis of $V$ and ${\mathfrak {w}}=w_{1},\ldots ,w_{m}$ be a basis of $W$. Then the assignment
    $\operatorname {Hom} _{K}{\left(V,W\right)}\longrightarrow \operatorname {Mat} _{m\times n}(K),f\longmapsto M_{\mathfrak {w}}^{\mathfrak {v}}(f),$
is an isomorphism
$K$

### Proof

The bijectivity was shown in fact. The additivity follows from
    ${\left(M_{\mathfrak {w}}^{\mathfrak {v}}(f+g)\right)}_{ij}=((f+g)(v_{j}))_{i}=(f(v_{j})+g(v_{j}))_{i}=f(v_{j})_{i}+g(v_{j})_{i}={\left(M_{\mathfrak {w}}^{\mathfrak {v}}(f)\right)}_{ij}+{\left(M_{\mathfrak {w}}^{\mathfrak {v}}(g)\right)}_{ij}\,,$
where the index $i$ denotes the $i$-th component with respect to the basis ${\mathfrak {w}}$.
$\Box$
This means that we can consider the direct sum decomposition for the one-dimensional linear subspaces $Kv_{i}$ or $Kw_{j}$ corresponding to bases and apply fact.

## Corollary

Let $K$ denote a field, and let $V$ and $W$ denote finite-dimensional $K$-vector spaces with dimensions $n$ and $m$. Then
    $\dim _{K}{\left(\operatorname {Hom} _{K}{\left(V,W\right)}\right)}=nm\,.$

### Proof

This follows immediately from fact.
$\Box$