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.
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'Collision of a bullet on a rod-string system: query'
In this question, I have a question. I am NOT trying to solve it, but it is just a conceptual question. Consider the point on the rod, which connects the string and the rod. My question: just before and after the collision, is ANGULAR momentum CONSERVED about this point? Lets call the point which connects the string and rod as P. Why am I asking this? : it is clear from the scenario that the point of concern, which connects the string and the rod, moves in a circular path due to the string...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...

Similar threads

Replies
5
Views
1K
Replies
7
Views
2K
Replies
19
Views
2K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
4
Views
956
Back
Top