Product of two matrices.

• Jan 3rd 2011, 06:04 PM
nighthawk
I have another problem i would appreciate some help on.

Matrix A
[ 0 1 0 0]
[ 1 0 0 0]
[ 0 0 0 1]
[ 0 0 1 0]

Matrix B
[ -2 1 0 1]
[ 3 0 2 1]
[ -1 1 2 -1]
[ 3 -2 1 0]

I need to find the products of AB and BA, if possible.

Being that both matrices are 4x4's I have concluded that matrix A x B and B x A are both possible. Would appreciate help and an explanation, Thanks!!!

P.S. Sorry if the matrices are sloppy, not entirely sure on how to type an complete solid matrix, sorry!
• Jan 3rd 2011, 06:06 PM
dwsmith
$\displaystyle AB=C; \ \ c_{ik}=\sum_{j=1}^{n}(a_{ij}b_{jk})$
• Jan 3rd 2011, 10:19 PM
mr fantastic
Quote:

Originally Posted by nighthawk
I have another problem i would appreciate some help on.

Matrix A
[ 0 1 0 0]
[ 1 0 0 0]
[ 0 0 0 1]
[ 0 0 1 0]

Matrix B
[ -2 1 0 1]
[ 3 0 2 1]
[ -1 1 2 -1]
[ 3 -2 1 0]

I need to find the products of AB and BA, if possible.

Being that both matrices are 4x4's I have concluded that matrix A x B and B x A are both possible. Would appreciate help and an explanation, Thanks!!!

P.S. Sorry if the matrices are sloppy, not entirely sure on how to type an complete solid matrix, sorry!

It is a sure thing that you have been given notes on how to multiply two matrices. Furthermore, there are thousands of websites that explain the process. The formula given above might be too abstract for you to use. In which case, I suggest you use Google to find some worked examples of matrix multiplication.
• Jan 3rd 2011, 10:37 PM
dwsmith
Simple example:

$\displaystyle \begin{bmatrix}
a_{11} & a_{12}\\
a_{21} & a_{22}
\end{bmatrix}\begin{bmatrix}
b_{11} & b_{12}\\
b_{21} & b_{22}
\end{bmatrix}$

$\displaystyle c_{ik}=\sum_{j=1}^{n}(a_{ij}b_{jk})$

$\displaystyle c_{11}=\sum_{j=1}^{n}(a_{i1}b_{1k})=a_{11}b_{11}+a _{12}b_{21}$

$\displaystyle c_{22}=\sum_{j=1}^{n}(a_{i1}b_{1k})=a_{21}b_{12}+a _{22}b_{22}$

$\displaystyle c_{12}=\sum_{j=1}^{n}(a_{i1}b_{1k})=a_{11}b_{12}+a _{12}b_{22}$

$\displaystyle c_{21}=\sum_{j=1}^{n}(a_{i1}b_{1k})=a_{21}b_{12}+a _{22}b_{22}$

$\displaystyle
\begin{bmatrix}
a_{11}b_{11}+a_{12}b_{21} & a_{11}b_{12}+a_{12}b_{22}\\
a_{21}b_{12}+a_{22}b_{22} & a_{21}b_{12}+a_{22}b_{22}
\end{bmatrix}$
• Jan 4th 2011, 03:15 AM
HallsofIvy
Have you learned the "dot product" of two vectors- $\begin{bmatrix}a & b & c\end{bmatrix}\begin{bmatrix}c \\ d\\ e\end{bmatrix}= ac+bd+ ce$.

If so, the number in the "i,j" place (i th row and jth column) of AB is the dot product of the ith row of A and the jth column of B.

The second row of your A is $\begin{bmatrix}1 & 0 & 0 & 0\end{bmatrix}$ and the third column of B is $\begin{bmatrix}0 \\ 2 \\ 1 \\ -2\end{bmatrix}$. Their dot product is $1(0)+ 0(2)+ 0(1)+ 0(-2)= 0$. The number in the second row and third column of AB is 0.

Now, practice! This isn't something you learn in a few minutes.
• Jan 4th 2011, 03:42 AM
DrSteve
The posts above are all very good. I think it might also help if I spell out a couple of the computations for you. I am going to use the method that I think is easiest to understand:

[ 0 1 0 0][ -2 1 0 1]
[ 1 0 0 0][ 3 0 2 1]
[ 0 0 0 1][ -1 1 2 -1]
[ 0 0 1 0][ 3 -2 1 0]

To get the (1,1) entry of AB you "multiply" row 1 of A and column 1 of B as follows:

(0)(-2)+(1)(3)+(0)(-1)+(0)(3) = 3

To get the (1,2) entry of AB you "multiply" row 1 of A and column 2 of B:

(0)(1)+(1)(0)+(0)(1)+(0)(-2) = 0

So the matrix starts off as [3 0 ...

There will be 16 such "multiplications" in all. See if you can do the rest, and then try computing BA (which is not necessarily equal to AB).