# How to visualize the matrix transformation?

Actually, the question is related to this topic, but it is no expected answer there. And it seems the following answer leads to another direction. As we know, we can visualize the vector by VectorPlot with some arrow:

VectorPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}]


The vector {y, -x} will act on every point. I want to visualize a matrix transformation like this way. I mean the matrix will act on every vector(its coordinate), the arrow represents the orientation of the result vector, and the length represents the norm of the result vector. But I don't know how to avoid those result vector overlapping. Any idea to do it?

• Could you provide an example of a transformation? – C. E. Mar 22 at 11:44
• Can you manually adjust the value of the VectorScale option for VectorPlot to get what you want? – Bill Mar 22 at 15:53
• Not sure I understand the question. Are you asking "Which matrix when multiplied by $(x,y)^T$ results in $(y,-x)$? If so, $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} y \\ -x \end{pmatrix}.$ – mjw Mar 22 at 21:15
• If you are asking how to keep all the vectors the same size, to avoid overlapping, you could divide each non-zero vector by its norm. In that case, the plot would only show direction, not magnitude. – mjw Mar 22 at 21:19
• @C.E. Sorry for late response, the network is broke here. The bills have give the right answer.. – yode Mar 23 at 6:10

You can visualize the action of a matrix on any element directly using VectorPlot. For example, consider the action of the matrix $$a$$:
a = {{1, -2}, {3, 3}};

This shows how $$a$$ acts on elements of $$R^2$$. You can control the size of the arrows in the plot using VectorScale -> 0.1, or VectorScale -> 0.05.