I was dealing with the following problem:
Let $V,W,X$ be vector spaces and let $T:V\to W$ and $S:W\to X$ be linear transformations.
(i) Prove Sylvester's Rank Inequality: $ rank(T) + rank(S) - dim(W) \leq rank(ST) \leq \min\{ rank(T), rank(S) \}. $
(ii) Let $A,B$ be two $4\times 5$ matrices of rank $3$ and let $C=A^T B$. Find all possible values for the rank of $C$. That is, for each possible value, find an explicit example of such matrices. Then prove that all other values are impossible.
Using part (i), one can find the possible values for the rank of $C=A^T B$. I was told that the dimension of $W$ must be $4$ in order for C to be well-defined, since $A^T$ is $5 \times 4$ and B is $4 \times 5$. While I understand this, I don't see why $W$ couldn't be something like a $4 \times y$ matrix, where $y$ could be anything, since vector spaces can be made up of matrices and not just vectors. Then the dimension would be $4y$ and not just $4$, and the linear maps would still be able to take $B: V \rightarrow W$, and $A^T: W \rightarrow X$ for some $V, X$. The rest of the proof makes sense, but it's just this one small concept that should be obvious that I'm stuck on. What am I missing?
This is a really good question because it's a subtle problem. I think the following might help clear it up (this is at least what helps me think about it).
Implicitly these matrices are representing linear functions on the usual $n$-space of vectors. If you wanted to view, for example, left multiplication by $A^T$ as a linear map -- let's call it $R$ -- on the space of $4\times y$ matrices, then you need to be a little more careful. In this case we have $\dim(W)=4y$, as you say. However, the matrix representation of $R$ is not the same as the matrix $A^T$. In particular, the rank of $R$ is not equal to the rank of the matrix $A^T$ (the rank of the matrix as calculated in the usual way through something like row reduction). This increase in the dimension of $W$ from $4$ to $4y$ will be off-set by the change in the rank of $R$. I encourage you to try an example of this!
To make it concrete, here is a small example of my claim about the rank changing. Consider the matrix $A^T$ being the identity matrix $I_4$ (in this case the matrix is square, but whatever). Then $I_4$ as a usual matrix linear transformation from $4$-vectors to $4$-vectors has rank $4$. But if we view this as the linear transformation $R$ above (i.e. as left multiplication by $I_4$ on $4\times y$ matrices), then the rank is $4y$. This is because the rank of $R$ is, by definition, the dimension of the image of $R$. In this case, $R$ is surjective (actually it is an isomorphism). In fact, the matrix representation of $R$ would be the $4y$ identity matrix, $I_{4y}$.
TLDR: if you change $W$ from dimension $4$ to dimension $4y$ (as you say in your question), then you are also changing the rank of the linear operator that $A^T$ represents. These changes should exactly off-set one another.