Set of linear transformations How to determine the dimension of {$T\in$ Lin($X,Y$) s.t. $T(A)\subset B$} where $A,B$ are subspaces of finite-dimensional vector spaces $X$ and $Y$? Thanks in advance!
P.S. Is there a general way of determining the dimension of a given set of functions? References to examples and/or explicit examples would be appreciated.

Choose bases of $A$ and $B$ and extend them to bases of $X$ and $Y$, respectively. The matrix of $T$ with respect to these bases must have zeros where it would send a basis vector of $A$ to a basis vector outside $B$, and can have arbitrary values everywhere else. Thus the dimension of the space of such matrices, and thus of the linear transformations, is $\dim X\dim Y - \dim A(\dim Y-\dim B)$.
[Edit in response to the comment:]
Here's an example. Let's say $X$ is the vector space (over the reals) of all polynomials in one variable up to fourth degree, $A$ is the subspace of even polynomials, $Y$ is $\mathbb R^3$ and $B$ is the $x$-$y$-plane. Then $\dim X=5$, $\dim A=3$, $\dim Y=3$ and $\dim B=2$, so
$$
\begin{eqnarray}
\dim\{T\in\text{Lin}(X,Y)\mid T(A)\subseteq B\}
&=&
\dim X\dim Y - \dim A(\dim Y-\dim B)
\\
&=&
5\cdot3-3\cdot(3-2)\\
&=&
12
\;.
\end{eqnarray}
$$
For instance, we can choose bases $\{1,x^2,x^4\}$ for $A$ and $\{(1,0,0),(0,1,0)\}$ for $B$ and extend them to bases of $X$ and $Y$ by $x$ and $x^3$ and by $(0,0,1)$, respectively. The functions that map one of the basis vectors of $X$ to one of the basis vectors of $Y$ form a basis of $\text{Lin}(X,Y)$, and there are $\dim X\dim Y = 5\cdot3=15$ such functions. But we can't use those that map an even monomial to $(0,0,1)$, because they don't map $A$ to $B$. There are $\dim A(\dim Y-\dim B)=3\cdot(3-2)=3$ of these, one for each even monomial. All the others we can use, since they either map basis elements that don't belong to $A$, which we don't care about, or they map basis elements of $A$ to basis elements of $B$, which is OK.
