2
$\begingroup$

I have just learned about matrix-vector multiplication.Is there a particular reason why we multiply a matrix by a column vector instead of a row vector?

For example $Ax = \begin{bmatrix}a&b\\c&d\end{bmatrix} \begin{bmatrix}x1\\x2\end{bmatrix}$

It is basically doing ax1+bx2 / cx1+dx2, why don't we use a row vector here? It seems to me multiplying a matrix by a row vector is more intuitive.

Edit I found this and I think it solves my question of why the multiplication is defined that way https://math.stackexchange.com/a/271937/231821

$\endgroup$
  • 1
    $\begingroup$ You can multiply a matrix by a row vector, but you would have to put the vector on the left. It's a matter of conventions, really. $\endgroup$ – Daniel Robert-Nicoud Jan 23 '16 at 0:20
  • $\begingroup$ In some mathematical topics (probability transition matrices for Markov chains) the convention is typically a row vector times a matrix. Both of these are just special cases of matrix-matrix multiplication. $\endgroup$ – hardmath Jan 23 '16 at 3:30
  • $\begingroup$ I suspect the convention of using column vectors comes from the older convention of writing coefficients to the right of the variable instead of the left. Generally in linear algebra, the variables are vectors and the coefficients are matrices. Of course we could have also defined matrix multiplication to be columns from the left times rows from the right instead of vice versa, but the conventional definition is more how we were used to seeing things flow. $\endgroup$ – Paul Sinclair Jan 23 '16 at 5:14
3
$\begingroup$

It has already been pointed out that you can multiply a row vector and a matrix. In fact, the only difference between the two multiplications below is that the numeric values in the first result are stacked in a column vector while the same numeric values are listed in a row vector in the second result:

$$\pmatrix{6& -7& 10 & 1 \\ 0& 3& -1 & 4 \\ 0& 5& -7 & 5 \\ 4&1&0&-2} \pmatrix{2\\-2\\-1\\1} = \pmatrix{17\\-1\\2\\4}$$

$$ \pmatrix{2 &-2&-1&1} \pmatrix{6& 0&0&4\\-7& 3&5&1\\10 & -1&-7&0\\1 & 4 & 5&-2} = \pmatrix{17&-1&2&4}$$

One simple pragmatic difference between these two equations is that the second one is a lot wider when it is fully written out.

It seems to me the first equation "fits" more neatly on the page because we have already committed to making an equation that is four rows tall (because of the $4\times4$ matrix, this is unavoidable), so there is no "cost" in also making the vectors four rows tall; and in return we get vectors that are only one column wide instead of four columns each. Now imagine the dimensions of the matrix were $6\times6$; the multiplication by a column vector would still fit neatly on this page but we might have some difficulty with the multiplication that uses row vectors; it might not fit within the margins of this column of text.

It's also possible that the convention is influenced by the interpretation of the matrix as a transformation to be applied to the vector, along with a preference for writing the names of transformations on the left of the thing they transform (much as we like to write a function name to the left of the input parameters of a function, that is, $f(x) = x^2$ rather than $(x)f = x^2$). But I'm not sure there is a more compelling reason behind this particular observation other than collective force of habit, and these patterns are not universal; sometimes people write the name of the transformation on the right.

$\endgroup$
2
$\begingroup$

The multiplication of the matrix $A=\left(\begin{array}{cc} a& b\\ c & d\end{array}\right)$ by the vector $\left(\begin{array}{c} x\\ y\end{array}\right)$ represents the linear map

$$\mathbb{R}^2\to \mathbb{R}^2, \left(\begin{array}{c} x\\ y\end{array}\right)\to \left(\begin{array}{c} ax+by\\ cx+dy\end{array}\right)=\left(\begin{array}{cc} a& b\\ c & d\end{array}\right)\left(\begin{array}{c} x\\ y\end{array}\right).$$ It also can be written as

$$\mathbb{R}^2\to \mathbb{R}^2, (x,y)\to (ax+by,cx+dy)=(x,y)\left(\begin{array}{cc} a & c\\ b & d\end{array}\right).$$

$\endgroup$
  • 3
    $\begingroup$ Doesn't it get exhausting to type out matrices as \left(\begin{array}{cc} a& b\\ c & d\end{array}\right) instead of the much easier \pmatrix{a & b \\ c & d}? 😉 $\endgroup$ – user137731 Jan 23 '16 at 0:55
  • $\begingroup$ @Bye_World You are right. I will use the much shorter \pmatrix. Thanks. $\endgroup$ – mfl Jan 23 '16 at 1:00

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.