# Thread: Vector and matrix multiplication

1. ## Vector and matrix multiplication

Is this possible? If yes, how?

2. Not as a usual matrix multiplication. In order to multiply "AB" where A and B are matrices, the number of columns of A must equal the number of rows of B. That is not true here and I do not know of any definition of "multiplcation" that will work.

You could, of course, multiply the other way:
$\displaystyle \begin{bmatrix}1 & 0 & 0 \\ 0 & cos b & sen b \\ 0 & -sen b & cos b\end{bmatrix}\begin{bmatrix}0 \\ 0 \\ r\end{bmatrix}= \begin{bmatrix}0 \\ r sen b \\ cos b\end{bmatrix}$.

Added: you could do this as a "tensor multiplication". That would involve multiplying all three elements of A by each of the 9 elements of B giving a 27 element "third order tensor". It would have to be written as a "three dimensional matrix" consisting of the three layers:
$\displaystyle \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix}$

$\displaystyle \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix}$

$\displaystyle \begin{bmatrix} r & 0 & 0 \\ 0 & rcos b & r sen b \\ 0 & -rsen b & r cos b\end{bmatrix}$
but that is probably NOT what is intended!

3. This is more about vector multiplication it seems, i thought it should be similar (sorry if i misled you). My teacher wrote this at the time, and i didn't get it. I know we can't multiply two matrices if the 1st doesn't have the same number of columns as the 2nd has of rows. So as he did it, then i suppose matrices rules don't apply here. Probably there is some other rule to multiply these two vectors...

Forget the initial vector and matrix multiplication, this one reflects better my doubt.

$\displaystyle \begin{bmatrix}0 \\ 0 \\ z\end{bmatrix} \begin{bmatrix}0 \\ rsen b \\ rcos b\end{bmatrix}= \begin{bmatrix} zrsen b \\ 0 \\ 0\end{bmatrix}$.

4. Oh! That's the "cross product" of two three dimensional vectors. Given two vectors, $\displaystyle \vec{X}= a\vec{i}+ b\vec{j}+ c\vec{k}$ and $\displaystyle \vec{Y}= u\vec{i}+ v\vec{j}+ w\vec{k}$, then the cross product is given by $\displaystyle \vec{X}\times\vec{Y}= (bw- cv)\vec{i}- (cu- aw)\vec{j}+ (av- bu)\vec{k}$. That can be remember by a mnemonic: write it as a "determinant":
$\displaystyle \left|\begin{array}{ccc}\vec{i} & \vec{j} & \vec{k} \\ a & b & c \\ u & v & w\end{array}\right|$

Now, cross-multiplication is "anti-symmetric": $\displaystyle \vec{X}\times\vec{Y}= -\vec{Y}\times\vec{X}$ and, in fact, what you have is the other way around:
$\displaystyle \begin{bmatrix}0 \\ 0 \\ z\end{bmatrix}\times\begin{bmatrix}0 \\ rsen b\\ rcos b\end{bmatrix}= \begin{bmatrix}-zr senb \\ 0 \\ 0\end{bmatrix}$
while
$\displaystyle \begin{bmatrix}0 \\ r sen \\ rcos b\end{bmatrix}\times\begin{bmatrix}0 \\ 0 \\ z \end{bmatrix}= \begin{bmatrix}zr senb \\ 0 \\ 0\end{bmatrix}$

The cross product cannot be generalized in any simple way to a product of a vector with a matrix or even to other dimensions. The cross product of two two-dimensional vectors is taken by treating them as three dimensional vectors with third component 0.