Question regarding matrix multiplication

AI Thread Summary
Matrix multiplication requires that the number of columns in the first matrix equals the number of rows in the second matrix. In the discussed example, multiplying a 2x3 matrix A by a 3x3 matrix B is valid, resulting in a 2x3 product. However, attempting to multiply in the reverse order (B*A) is not defined due to incompatible dimensions. The outer dimensions of the resulting matrix can be determined by the outer dimensions of the multiplied matrices, while the inner dimensions must match for multiplication to be valid. Understanding these rules is essential for correctly performing matrix operations.
Mathman23
Messages
248
Reaction score
0
Hi

When one is trying to multiply two matrices of different sizes e.g. a 2x3 and a 3x3. I know that one has to use the column-row-rule which states:

AB_{ij} = a_{i1} b_{1j} + a_{i2} b_{2j} + \cdots + a_{i n} b_{m j}

Looking at the following example:

A= \left[ \begin{array}{ccc} 7 & 2 & 0 \\ -4 & 6 & 2 \\ -1 & \frac{2}{5} & \frac{7}{5} \end{array} \right] \ \ \ B = \left[ \begin{array}{ccc} 7 & 2 & 0 \\ -4 & 6 & 2 \\ \end{array} \right]

Using the column-row-rule I calculate the matrix-product AB:

AB= \left[ \begin{array}{ccc} 7 & 2 & 0 \\ \\ \\ \end{array} \right] \cdot \left[ \begin{array}{cc} -4 &7 \\ 6 &2 \\ 2 & 0 \end{array} \right] = \left[ \begin{array}{cc} -16 & 53 \\ \\ \\ \end{array} \right]

But if I then write the B-matrix upside-down I get:

AB= \left[ \begin{array}{ccc} 7 & 2 & 0 \\ \\ \\ \end{array} \right] \cdot \left[ \begin{array}{cc} 0 &2 \\ 2 & 6 \\ 7 & -4 \end{array} \right] = \left[ \begin{array}{cc} 4 & 30 \\ \\ \\ \end{array} \right]

Which of the two results is the correct approach to compute the matrix-product AB ?

Does there exist a rule in linear algebra which allows me to predetermain if the product of two matrices A and B both not of the same size ( A is n x n and B is m x n ) gives the resulting matrix C which has a different size than A and B ?

Many thanks in advance :smile:

Sincerley
Fred
 
Last edited:
Physics news on Phys.org
you can't do A*B, you can do B*A but A*B is impossible.

its pretty easy to remember 2x3*3x3 is a 2x3 (just look at the outer numbers, also the inner ones must be the same to be able to multiplicate em)
 
Okay then the operation I did by tilting the matrix B is illegal. SORRY.

Then the rows of the matrices A and B has to be equal in-order for the matrix-product AB to be legal??

In general terms I guess that implies if a matrix A is n x n and a matrix B is m x n then the matrix-product AB is m x n ?

But there isn't a rule/theorem which details this??

Sincerely

Fred

allistair said:
you can't do A*B, you can do B*A but A*B is impossible.

its pretty easy to remember 2x3*3x3 is a 2x3 (just look at the outer numbers, also the inner ones must be the same to be able to multiplicate em)
 
If a matrix A is n x n and a matrix B is m x n then the matrix-product AB does't exist at all. You can compute only BA.
In general. If A is m x k, and B is k x n, than AB is m x n. But BA isn't defined. Number of columns of first matrix must be equal to number of rows of second
 
Mathman,

I think you're still confused.

For A*B to be defined, the # of columns in A has to equal the # of rows in B. So A(j,k)*B(k,m) = C(j,m). But A(j,k)*B(m,n) is not defined unless k=m.

No theory is really required for this; it's just the definition of matrix multiplication.
 
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...

Similar threads

Back
Top