I'm trying to solve the following:
Let $V$ be an $n$-dimensional vector space over a field $K$, and let $U$ be a $k$-dimensional subspace of $V.$ Find the dimension of the vector space $$M=\{\varphi:V\to V\mid \varphi \text{ is linear and } \varphi(U)\subseteq U\}.$$
First I noted that $\dim(V^*)=\dim(V) = n$ and $M\subseteq V^*$. Thus $\dim(M)\leq n$. Let $\beta=\{\varphi_1,...,\varphi_n \}$ be a basis for $V^*$. Now if $\varphi \in V^*$, then we can write $\varphi = \lambda_1\varphi_1 + \cdots + \lambda_n\varphi_n$ for some $\lambda_1,...,\lambda_n$. Thus elements of $M$ can also be represented as linear combinations of $\varphi_1,...,\varphi_n$. Also, $\dim(U^*)=\dim(U)=k$, so we must have $\dim(M)\geq k$. However, I don't know how to proceed from here.
I'd appreciate any help.