# Question regarding matrix multiplication

• Mathman23
In summary, the column-row-rule states that when multiplying two matrices of different sizes, the resulting matrix will have the number of rows of the first matrix and the number of columns of the second matrix. In general, if A is m x k and B is k x n, then the product AB will be m x n. However, BA is not always defined. The number of columns in A must equal the number of rows in B for the product to be defined.
Mathman23
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 ?

Sincerley
Fred

Last edited:
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.

## What is matrix multiplication?

Matrix multiplication is a mathematical operation that involves multiplying two matrices together to create a new matrix. It is a fundamental operation in linear algebra and is often used in various fields such as physics, engineering, and computer science.

## What are the basic rules of matrix multiplication?

The basic rules of matrix multiplication are:

• The number of columns in the first matrix must be equal to the number of rows in the second matrix.
• The order of multiplication matters, i.e. AB is not equal to BA.
• The resulting matrix will have the same number of rows as the first matrix and the same number of columns as the second matrix.
• The elements of the resulting matrix are calculated by multiplying each element in a row of the first matrix by the corresponding element in a column of the second matrix, and then summing up the products.

## What are some real-world applications of matrix multiplication?

Matrix multiplication has numerous real-world applications, such as:

• In computer graphics, it is used to transform and manipulate 2D and 3D objects.
• In economics, it is used to model and analyze economic systems.
• In machine learning, it is used in algorithms such as principal component analysis and linear regression.
• In physics, it is used to solve systems of linear equations and to calculate transformations in quantum mechanics.

## Can any two matrices be multiplied together?

No, in order for two matrices to be multiplied together, the number of columns in the first matrix must be equal to the number of rows in the second matrix. Otherwise, the operation is not defined.

## Is matrix multiplication commutative?

No, matrix multiplication is not commutative. This means that the order of multiplication matters and AB is not equal to BA. In other words, the product of two matrices is not the same regardless of the order in which they are multiplied.

• Introductory Physics Homework Help
Replies
13
Views
929
• Linear and Abstract Algebra
Replies
5
Views
1K
• Calculus and Beyond Homework Help
Replies
4
Views
169
Replies
19
Views
2K
• Linear and Abstract Algebra
Replies
2
Views
1K
• Introductory Physics Homework Help
Replies
7
Views
1K
Replies
7
Views
1K
• Introductory Physics Homework Help
Replies
8
Views
652
• Linear and Abstract Algebra
Replies
3
Views
847
• Quantum Physics
Replies
11
Views
2K