I'm so confused on how we can have a 2x3 matrix A, multiply it by a vector in $\Bbb R^3$ and then end up with a vector in $\Bbb R^2$. Is it possible to visualize this at all or do I need to sort of blindly accept this concept as facts that I'll accept and use? Can someone give a very brief summarization on why this makes sense? Because I just see it as, in a world (dimension) in $\Bbb R^3$, we multiply it by a vector in $\Bbb R^3$, and out pops a vector in $\Bbb R^2$.


  • 1
    $\begingroup$ maybe think of multiplying a matrix by a vector as a special case of multiplying a matrix by a matrix $\endgroup$ – J. W. Tanner Apr 8 at 1:54
  • $\begingroup$ Is it the definition of matrix multiplication that gives you trouble? Have you tried doing a multiplication and seeing what you get? Do you understand that we can have a function like $f(x,y,z)=(x-2y+z, 2x+4y-z)$ which maps $\mathbb R^3$ to $\mathbb R^2$? $\endgroup$ – John Douma Apr 8 at 2:06
  • $\begingroup$ I think it's just visualizing it that gives me trouble. Like simple vector addition, I can easily say, oh ok just add the $x_1$ unit to the other $x_1$ unit and it stretches towards $x_1$'s side! But in this case, just multiplying a vector by something in one dimension and getting a vector in another dimensions just confuses me. And I do know we can have a function like that, it's just intuitively I guess I don't really understand it $\endgroup$ – ming Apr 8 at 4:30
  • $\begingroup$ If you think of vectors in $\mathbb R^3$ as being three components in the $\hat i$, $\hat j$ and $\hat k$ directions then you can think of the matrix as mapping $\hat i$ to the first column vector, $\hat j$ to the second column and $\hat k$ to the third column. Since each of the column vectors are in two dimensions we end up with a vector in two dimensions. $\endgroup$ – John Douma Apr 8 at 13:51
  • $\begingroup$ Ohh.. ok thank you! $\endgroup$ – ming Apr 8 at 22:56

A more intuitive way is to think of a matrix "performing" on a vector, instead of a matrix "multiplying" with a vector.

Let's give an example. You have some triples of real numbers:

(1,2,3), (2,5,1), (3,5,9), (2,9,8)

and you "forget" the third coordinate:

(1,2), (2,5), (3,5), (2,9)

Surprisingly, this is an example of "matrix performance." Can you find a matrix $M$ that "forgets" the third coordinate?


The matrix is $$\left(\begin{array}{l}1 & 0 & 0 \\ 0 & 1 & 0 \end{array}\right)$$


To get the first column, think about what happens under matrix multiplication to the vector $(1,0,0)$. The next two columns are similar.

We call such a matrix $M$ a projection. We may visualize the projection as such.

Projection; Image from www.math4all.in

Can you see what it means to "forget" the third coordinate?

The important part of a projection is linearity:

  • You may project the addition of two vectors, or you may add the projection of two vectors and you get the same result.
  • Similarly, you may project a scaled vector, or scale the vector and then project it, and you get the same result.

We call a function with the linearity property a linear function.

In symbols, for any linear $f$,

  • $f(v + w) = f(v) + f(w)$
  • $f(cv) = cf(v)$

We see that the projection defined above is a linear function. Actually, you can check that every matrix is a linear function. Perhaps it is more surprising that every linear function is a matrix. You may think of a matrix as a way to represent some linear function.

  • 2
    $\begingroup$ This was really helpful, thanks! Now if we "forget" about that third element, does that mean that the third dimension just totally disappears? The z-axis is just removed completely? $\endgroup$ – ming Apr 8 at 4:32
  • $\begingroup$ Yes, the third dimension "totally disappears!" $\endgroup$ – user156213 Apr 9 at 7:07

For the moment don't think about multiplication and matrices.

You can imagine starting from a vector $(x,y,z)$ in $\mathbb{R}^3$ and mapping it to a vector in $\mathbb{R}^2$ this way, for example: $$ (x, y, z) \mapsto (2x+ z, 3x+ 4y). $$

Mathematicians have invented a nice clean way to write that map. It's the formalism you've learned for matrix multiplication. To see what $(1,2,3)$ maps to, calculate the matrix product $$ \begin{bmatrix} 2 & 0 & 1 \\ 3 & 4 & 0 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} = \begin{bmatrix} 5\\ 11 \end{bmatrix}. $$

You will soon be comfortable with this, just as you are now with whatever algorithm you were taught for ordinary multiplication. Then you will be free to focus on understanding what maps like this are useful for.

Edit in response to a comment.

No, this does not make $(5,11)$ "look like" $(1,2,3)$. Here is a toy example that suggests where you might find this kind of calculation. Suppose you run a business that builds three products. Call them A, B and C. To make an A you need $2$ widgets and $3$ gadgets. To make a B you need just $4$ gadgets. For a C you need just a single widget. How many widgets and gadgets should you order to make $1$ A, $2$ B's and $3$ C's? The matrix product above provides the answer. You could also use that $2 \times 3$ matrix to figure out what orders you might fill if you knew how many widgets and gadgets you had in stock.

Matrices are helpful in geometry too. In a linear algebra course you learn how to see that when you use the matrix $$ \begin{bmatrix} 3 & -1 \\ -1 & 3 \end{bmatrix} $$ to map the coordinate plane (pairs of numbers) to itself what you have done is stretch circles centered at the origin into ellipses by changing the scales along the diagonal lines $y=x$ and $y=-x$ m

  • $\begingroup$ So in really simple terms, is (5, 11) a vector in 2 dimensions, that just "looks" like the vector (1, 2, 3) in 3 dimensions? $\endgroup$ – ming Apr 8 at 4:33
  • $\begingroup$ @ming No. See my edit. $\endgroup$ – Ethan Bolker Apr 8 at 12:19

A linear mapping has the property that it maps subspaces to subspaces.

So it will map a line to a line or $\{0\}$, a plane to a plane, a line, or $\{0\}$, and so on.

By definition, linear mappings “play nice” with addition and scaling. These properties allow us to reduce statements about entire vector spaces down to bases, which are quite “small” in the finite dimensional case.


Suppose you have a green tank, a blue tank, and a red tank, and suppose each liter in the blue tank contain .2 L of water and .1 L alcohol. For the blue tank, it's .3 L water .6 L alcohol. The red tank is .4 L water and .5 L alcohol. Now suppose we take $b$ liters from the blue tank, $g$ from the green, and $r$ from the red, and we look at how much total water ($w$) and alcohol ($a$) we have. We are starting with a three dimensional vector (how much from the green, blue, and red tanks), and ending up with a two dimensional vector (how much of water and alcohol). We can write this as:

$.2 g + .3 b + .4 r = w$
$.1 g + .6 b + .5 r = a$

In matrix form, that's

$$ \begin{bmatrix} .2 & .3 & .4 \\ .1 & .6 & .5 \end{bmatrix} \begin{bmatrix} g \\ b \\ r \end{bmatrix} = \begin{bmatrix} w\\ a \end{bmatrix}. $$

Multiplying a vector be a matrix is simply a compact form of saying "take this much of each element"; in this case the $.2$ saying "take 20% of $b$ to get $w$", the $.1$ is saying "take 10% of $g$ to get $a$", etc. The column a number is in tells you which input number it's being multiplied with, and the row tells you what output it's contributing to.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.