Matrix operations
A matrix is just a rectangular grid of numbers, but the moment you start adding, scaling, and multiplying these grids, arithmetic stops behaving the way it does for ordinary numbers. Two matrices can multiply in one order and give a completely different answer in the other order — and two genuinely non-zero matrices can multiply together to give the zero matrix, something that never happens with real numbers. ISC Class 12 expects you to add, subtract, scalar-multiply, and multiply matrices of order up to fluently, to know exactly when a product is even defined, and to be able to construct examples that expose these "un-number-like" behaviours. This article rebuilds the row-by-column multiplication rule from first principles, works through a full numeric example, and flags the traps examiners love to set around non-commutativity and the zero-product surprise.
Matrix addition and scalar multiplication act entry-by-entry, but matrix multiplication combines rows of one matrix with columns of the other via , a rule that requires matching inner orders and, crucially, does not commute.
The core idea
A matrix of order has rows and columns, written where sits in row , column . Two matrices are equal only when their orders match and every corresponding entry is identical — there is no notion of "approximately equal" matrices in this algebra.
Addition and subtraction only make sense between matrices of the same order, and they act entry-wise:
where: and are the entries of and in the same position, and the result has the same order as and .
Scalar multiplication stretches or shrinks every entry by the same factor:
where: is a real number (the scalar) and is the entry of the scaled matrix in position .
Matrix multiplication is the one that behaves unlike anything in ordinary arithmetic. If is and is — the number of columns of must equal the number of rows of — then is , with
where: is built by pairing row of with column of term by term and summing, is the shared "inner" dimension that must match, and the outer dimensions and survive into the order of . The figure below shows why the inner dimensions must agree: each output entry needs a row and a column of exactly the same length to pair up.
Two properties matter most for exam problems. First, matrix addition and multiplication are both associative, and multiplication distributes over addition: and whenever the products are defined. Second, and most tested, matrix multiplication is non-commutative: in general, even when both products exist and have the same order. A further surprise is that (the zero matrix) does not force or — two genuinely non-zero matrices can multiply to zero, unlike real numbers where forces or . The transpose swaps rows and columns, with and (note the order flips).
The goal is to derive the row-by-column product rule for two general matrices and show, symbolically rather than by a lucky numeric accident, that swapping the order of multiplication changes the answer in general — establishing why is the normal case rather than an exception.
Step 1. Set up two general matrices, and . Both are , so both and are defined and are themselves — the compatibility condition is satisfied in both orders, so any difference we find cannot be blamed on a mismatched order.
Step 2. Apply to get . Row 1 of against column 1 of gives entry ; row 1 against column 2 gives ; row 2 against column 1 gives ; row 2 against column 2 gives . So .
Step 3. Now swap the order and compute the same way. Row 1 of against column 1 of gives ; row 1 against column 2 gives ; row 2 against column 1 gives ; row 2 against column 2 gives . So .
Step 4. Compare entry in both: gives , while gives . These are built from entirely different pairings — 's never involves , but 's never involves — so there is no algebraic reason for the two expressions to match for arbitrary . They agree only for special choices (for instance if is a multiple of the identity matrix), never as a general identity. This confirms symbolically what the compatibility diagram already hinted: multiplication mixes rows with columns in a direction-sensitive way, so the order in which you multiply two matrices is part of the answer, not a cosmetic choice. Verified: the general product formulas and have structurally different entries, confirmed with the numeric worked example below.
Worked example
Let and . Find , the product , and check whether .
Step 1. Scale each matrix first. and , each entry simply multiplied by the scalar.
Step 2. Subtract entry-wise, since both scaled matrices are : .
Step 3. Compute using the row-by-column rule. Both matrices are so the product is defined and : entry , entry , entry , entry , giving .
Step 4. Compute the same way and compare: entry , entry , entry , entry , giving . This is plainly different from , confirming non-commutativity for this pair. Final answer: , , and .
Competitive stretch
Show that two non-zero matrices can multiply to give the zero matrix, using and . Every entry of works out to , so , even though neither nor is the zero matrix — the "zero-product law" that holds for real numbers ( or ) simply has no matrix analogue.
Common traps
- Adding or multiplying matrices without checking orders first — for , the columns of must equal the rows of , or the product is not defined at all.
- Assuming by habit from ordinary algebra; the symbolic derivation above shows this fails for generic matrices, so never swap multiplication order in a matrix manipulation.
- Concluding or whenever — this cancellation law from real-number arithmetic does not carry over to matrices, as the competitive stretch example shows.
- Mixing up scalar multiplication (every entry scaled by one number ) with matrix multiplication (a row-by-column sum) — they use the same word "multiplication" but are structurally different operations.
Ask the tutor: if you want to practise spotting when a matrix product is defined or want more non-commutativity and zero-product examples worked step by step, ask the AI tutor about "matrix operations."
Why does matrix multiplication need matching inner dimensions at all
Because each entry of the product is built by pairing a row of the first matrix with a column of the second, term by term, and summing — see . That pairing only makes sense if the row and the column have exactly the same number of entries, which is precisely "columns of A equals rows of B." If they mismatch, some terms in the row would have no partner in the column, so the sum simply cannot be formed and the product is undefined, not just unconventional.
Is there any situation where AB actually does equal BA
Yes, but it is the exception, not the rule. If one of the matrices is the identity matrix, or a scalar multiple of the identity, multiplication commutes because scaling every direction equally does not care about order. Some special pairs (for example a matrix and its own inverse, or a matrix and a suitable polynomial in itself) also commute. But for two "random" matrices, as the symbolic derivation shows, there is no reason for and to agree, so you should always verify rather than assume.
How is matrix subtraction different from matrix multiplication in terms of what can go wrong
Subtraction only ever fails for one reason: the two matrices have different orders, in which case there is no entry-wise pairing possible, full stop. Multiplication can "look" fine at first glance and still fail, or succeed but not in the order you expected — you must separately check that the inner dimensions match, and separately remember that the order of multiplication changes the answer. So subtraction has one trap (order mismatch), while multiplication effectively has two (definedness, then non-commutativity).