Q:

Finding the dimension of and a basis for $\text{Hom}_K(U, V)$

I have a query regarding a linear algebra assignment. 
The question I must answer is the following: 
Let $U$ and $V$ be vector spaces of dimensions $n$ and $m$ over $K$, and let $\text{Hom}_K(U, V)$ 
be the vector space over K of all linear maps from U to V . Find the dimension and 
describe a basis of $\text{Hom}_K(U, V)$. (You may find it helpful to use the correspondence 
with $m$ × $n$ matrices over $K$.) 
I managed to find a discussion of the question at the following site: Dimension of $\text{Hom}(U,V)$ 
However, I haven't fully understood the discussion. 
Could somebody please explain how we know that the cardinality/dimension of the set $\text{Hom}_K(U, V)$ is $nm$? 
Also, please could somebody explain how the basis is found? 
Thank you.

A:

Assuming that $U$ and $V$ are finite dimensional then any linear transformation $T:U \to V$, i.e. an element $T \in \textbf{Hom}_K (U,V)$, can be represented as a matrix $\dim V \times \dim U$ whose entries are elements of the field $K$. One way to see this is that the first column of the matrix of $T$ maps the first basis vector of $U$, written as a vector $u_1 = (1,0,0,\ldots,0)$, to a linear combination of of the basis vectors of $V$. For example consider $T:\mathbb{R}^2 \to \mathbb{R}^2$, with the standard basis on the domain and codomain, such that $T(1,0) = (0,1)$ and $T(0,1) = (-1,0)$. The matrix for this is given by $$\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$$ so that the first column says that $(1,0)$ maps to $T(1,0) = 0\cdot (1,0)+1\cdot (0,1)$ and $(0,1)$ maps to $T(0,1) = -1 \cdot (1,0) + 0 \cdot (0,1)$. This poorly explained example aside, since we can identify each transformation $T$ with a $\dim V \times \dim U$ matrix whose entries are field elements, one need only show that the matrices whose only nonzero entry is a $1$ form a basis. So for the example above the matrices to consider are $$\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}, \text{and } \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}$$ One can show that these matrices are linearly independent and span the space $\textbf{Hom}_K (U,V)$. Since there are $\dim V \cdot \dim U$ entries in an $\dim V \times \dim U$ matrix, then the dimension is $\dim V \cdot \dim U$.

