Multiplication of matrices
Adding two matrices is easy: match up positions and add. Multiplying them is a different game entirely — you do not multiply entry by entry, you combine whole rows of one matrix with whole columns of another. This is the third and most demanding operation in the CBSE Class 12 Matrices chapter, and it is the one examiners lean on hardest, both for direct computation and for probing its strange behaviour. Unlike ordinary numbers, matrices generally do not commute: is usually not the same as . Two nonzero matrices can even multiply to give the zero matrix, something that never happens with real numbers. This article builds the row-by-column rule from scratch, works it through fully with a example, shows exactly where the rule breaks down for students, and gives you a compact toolkit for exam day.
Matrix multiplication exists only when the number of columns of equals the number of rows of , and its entry is the sum of row of multiplied term by term with column of .
The core idea
The compatibility rule. Matrix multiplication is defined only when the number of columns of equals the number of rows of . If is and is , the product exists and is an matrix. Write the two orders side by side, : the two inner numbers must match for the product to exist, and the two outer numbers survive to give the order of the result. If the inner numbers disagree, the product simply does not exist — there is no way to force it.
The row-by-column rule. Each entry of the product is built from one row of and one column of , multiplied term by term and added:
where: is the -th entry of row of , is the -th entry of column of , and is the shared inner dimension — the number of terms in the sum. Entry of the product uses only row of and column of ; every other row or column of either matrix is irrelevant to that one entry.
Non-commutativity and the zero-product surprise. Matrix multiplication generally does not commute: in general, even when both products exist and have the same order. There also exist nonzero matrices with (the zero matrix) — a thing that is impossible for ordinary real numbers, where forces or . The syllabus restricts illustrative examples of both facts to square matrices, which is exactly the size worked below.
Associativity carries over. Matrix multiplication is associative, , so a chain of several products can be grouped and computed in any order without changing the answer. This property is used repeatedly later in the chapter when proving facts about invertible matrices.
The goal is to compute for two given matrices using the row-by-column rule, checking dimension compatibility first and then working out all four entries of the product one at a time, so the mechanics of become completely explicit rather than a formula taken on faith.
Step 1. Take and . Both are , so the inner dimensions (2 and 2) match, the product exists, and it will be .
Step 2. Entry comes from row 1 of , which is , paired with column 1 of , which is : .
Step 3. Entry pairs row 1 of , , with column 2 of , : .
Step 4. Entry pairs row 2 of , , with column 1 of , : .
Step 5. Entry pairs row 2 of , , with column 2 of , : . Assembling all four entries gives .
Worked example
Show that matrix multiplication is not commutative using the same and , and give a nonzero-matrix pair whose product is the zero matrix.
Step 1. Compute with and . Entry : . Entry : . Entry : . Entry : . So .
Step 2. Compare with from the derivation above. The two products disagree in every entry, so — matrix multiplication is not commutative here, and this single counterexample is enough to disprove commutativity in general.
Step 3. Now take and , both nonzero. Entry of : . Entry : . Entry : . Entry : .
Step 4. So , the zero matrix, even though and are individually nonzero. Final results: , and with nonzero.
Competitive stretch
If is and is , then is defined and is , but is also defined — and is . Since and do not even have the same order here, they plainly cannot be equal; commutativity can fail not just by unequal entries but by the two products having entirely different shapes. Always check both orders before assuming even makes sense.
Common traps
- Trying to multiply matrices whose inner dimensions don't match — always verify columns of the first equal rows of the second before starting.
- Multiplying entries position by position, as in addition, instead of doing the row-times-column sum — this is the single most common matrix-multiplication error.
- Dropping a term from the sum — the number of terms must equal the shared inner dimension, or the entry comes out wrong.
- Assuming out of habit from ordinary number multiplication — matrix multiplication is generally non-commutative, and even the order of the product can differ.
- Concluding that forces or — unlike real numbers, this zero-product reasoning fails for matrices, as the example shows.
Ask the tutor: Want to practice the row-by-column rule on a rectangular (non-square) matrix pair, or see more nonzero-times-nonzero-equals-zero examples? Ask the AI tutor to walk through a few with you.
Why can't I just multiply matrices entry by entry, like I do for addition?
That operation exists and is called the Hadamard product, but it is not what "matrix multiplication" means in this chapter or in most applications, including the ones matrices were designed for, such as representing linear transformations or systems of equations. The row-by-column definition is the one that makes matrix multiplication correspond to composing transformations, which is why it is the standard rule tested on your board and used everywhere else.
How do I quickly check whether a product is even defined, without writing anything out?
Write the two orders next to each other as . Look only at the two numbers touching in the middle — if they match, the product exists and its order is the two outer numbers, . If the middle numbers disagree, stop: the product simply does not exist, no matter how the entries look.
If AB and BA are both defined and have the same order, are they ever equal?
Sometimes, but not in general — you cannot assume it. Special pairs of matrices do commute, for instance a matrix with itself, with the identity matrix, or two matrices that happen to be built from the same simpler structure. But for arbitrary matrices, as the worked example shows with , equality is the exception rather than the rule, so always compute both if a question genuinely asks you to compare them.