# How does a matrix times a vector yield a vector?

1. Jun 25, 2012

### vanmaiden

The title pretty much sums up my quandary. I'm confused as to how a vector "x" with the same number of elements as columns in matrix "A" could yield a vector "b" when multiplied together. I mean, what's stopping "b" from being a matrix instead?

2. Jun 25, 2012

### Muphrid

This is just how matrix-vector mulitplication is defined.

If you're familiar with dot products and such, perhaps this explanation will give you a better understanding of what's going on. Consider the matrix,

$$A = \begin{pmatrix} 3 & 4 & 2 \\ -1 & 7 & 6 \\ 9 & -5 & -8\end{pmatrix}$$

This describes a linear operator which can be expressed in terms of dot products and basis vectors. Namely, for any vector $a$,

$$\underline A(a) = [(3e_1 + 4 e_2 + 2 e_3) \cdot a]e_1 + [(-e_1 + 7 e_2 + 6 e_3) \cdot a]e_2 + [(9e_1 - 5 e_2 - 8 e_3) \cdot a]e_3$$

Matrix-vector multiplication has been defined in such a way to make this series of dot products easy to quickly evaluate and to make the components of all these various vectors easy to write down in a small space. Nevertheless, this is an entirely equivalent description of what's happening. It's not really "multiplication" at all. It's a linear operator--it's more like a function.

3. Jun 25, 2012

### HallsofIvy

Do you know how matrix multiplication is defined? If so, you should know that multiplying a matrix with "n" rows and "m" columns time a matrix with "m" rows and "s" columns (and if the number of columns in the first matrix is not equal to the number of rows in the second matrix then you can't multiply them) then the product matrix has "n" rows and "s" columns. In particular, if the second "matrix" is actually a vector, written as an "m" by "1" matrix, then the product matrix is an "n" by "1" matrix, a vector.