Properties of matrix operations

Ordinary numbers obey a familiar set of rules — you can add them in any order, group multiplications however you like, and expand brackets freely. Matrices are built from addition, scalar multiplication and multiplication too, so a natural question follows: do the same rules survive the move from single numbers to whole grids of numbers? Mostly, yes. Addition, scalar multiplication, and the associative and distributive laws for multiplication all carry over from ordinary algebra to matrices, whenever the orders of the matrices involved make each operation defined. But one familiar rule spectacularly fails: matrix multiplication is not commutative, so ABAB and BABA can be entirely different matrices, or even one can exist while the other does not. This article states exactly which properties hold, shows why the ones that hold are true, and builds intuition for why commutativity in particular breaks down — the single most exam-tested fact in this topic.

The core insight

Matrix addition and scalar multiplication obey all the usual commutative, associative and distributive laws, and matrix multiplication is associative and distributive over addition, but matrix multiplication is generally not commutative (AB≠BAAB \neq BA) and AB=OAB = O does not force A=OA = O or B=OB = O.

The core idea

For matrices AA, BB, CC of orders that make every operation below defined, and scalars k,k1,k2k, k_1, k_2, the following properties hold.

Addition behaves exactly like ordinary addition. It is commutative and associative, has an identity (the zero matrix OO) and every matrix has an additive inverse:

A+B=B+A,(A+B)+C=A+(B+C),A+O=A,A+(−A)=OA + B = B + A, \qquad (A+B)+C = A+(B+C), \qquad A + O = A, \qquad A + (-A) = O

where: OO is the zero matrix of the same order as AA, and −A-A is the matrix obtained by negating every entry of AA. These hold entry by entry, because adding matrices just adds ordinary numbers position by position, and ordinary number addition already has all these properties.

Scalar multiplication distributes cleanly, both over matrix addition and over sums of scalars:

k(A+B)=kA+kB,(k1+k2)A=k1A+k2A,k1(k2A)=(k1k2)Ak(A+B) = kA + kB, \qquad (k_1+k_2)A = k_1A + k_2A, \qquad k_1(k_2A) = (k_1k_2)A

where: k,k1,k2k, k_1, k_2 are real numbers, and kAkA means every entry of AA multiplied by kk. Again these follow directly from the distributive and associative laws for ordinary numbers, applied one entry at a time.

Matrix multiplication is associative and distributive, but not commutative. For matrices of orders that make the products defined,

(AB)C=A(BC),A(B+C)=AB+AC,(A+B)C=AC+BC,AI=IA=A(AB)C = A(BC), \qquad A(B+C) = AB + AC, \qquad (A+B)C = AC+BC, \qquad AI = IA = A

where: II is the identity matrix of the appropriate order, which behaves like the number 11 for multiplication. But in general

AB≠BAAB \neq BA

even when both products exist and have the same order — this is usually demonstrated with 2×22\times2 matrices, as in the derivation below. A second surprise follows from the same asymmetry: AB=OAB = O does not force A=OA = O or B=OB = O, unlike the zero-product rule you trust for ordinary numbers. The reason the "good" properties survive is that they are proved using only the entry-by-entry recipes for addition and multiplication, and those recipes behave consistently — associativity and distributivity for matrices reduce, entry by entry, to associativity and distributivity for the real numbers inside them. Commutativity fails specifically because the row-by-column rule defining (AB)ij(AB)_{ij} — multiply row ii of AA by column jj of BB and sum — treats AA and BB asymmetrically. There is no reason rows of AA against columns of BB should give the same numbers as rows of BB against columns of AA, and generally they do not.

Figure
Two grids showing that multiplying A by B and multiplying B by A combine the same numbers in different orders and give different matrices
AB is not the same as BA A times B row of A times column of B summed entry by entry gives matrix AB B times A row of B times column of A summed entry by entry gives matrix BA Same two matrices, opposite roles in the recipe so the two results generally differ AB does not equal BA in general
Derivation AWhy matrix multiplication distributes over addition

The goal is to prove, using nothing beyond the entry-by-entry definitions of matrix addition and matrix multiplication, that A(B+C)=AB+ACA(B+C) = AB + AC for any matrices AA, BB, CC whose orders make the sum and both products defined, and to see exactly why the proof works entry by entry rather than needing any special matrix trick.

Step 1. Set up the entries. Let AA be m×nm \times n and let B,CB, C be n×pn \times p, so B+CB + C is also n×pn \times p and A(B+C)A(B+C) is a well-defined m×pm \times p matrix. Write aika_{ik} for the (i,k)(i,k) entry of AA, and bkj,ckjb_{kj}, c_{kj} for the (k,j)(k,j) entries of BB and CC.

Step 2. Write the (i,j)(i,j) entry of the left side using the definition of matrix multiplication. By definition, [A(B+C)]ij=∑k=1naik(bkj+ckj)[A(B+C)]_{ij} = \sum_{k=1}^{n} a_{ik}(b_{kj}+c_{kj}), since the (k,j)(k,j) entry of B+CB+C is simply bkj+ckjb_{kj}+c_{kj}.

Step 3. Expand using ordinary algebra on numbers. Each term aik(bkj+ckj)=aikbkj+aikckja_{ik}(b_{kj}+c_{kj}) = a_{ik}b_{kj} + a_{ik}c_{kj}, because aik,bkj,ckja_{ik}, b_{kj}, c_{kj} are just real numbers and real-number multiplication distributes over addition. Summing over kk, ∑kaik(bkj+ckj)=∑kaikbkj+∑kaikckj\sum_{k} a_{ik}(b_{kj}+c_{kj}) = \sum_{k} a_{ik}b_{kj} + \sum_{k} a_{ik}c_{kj}.

Step 4. Recognise the right side. The two sums are exactly [AB]ij[AB]_{ij} and [AC]ij[AC]_{ij} by the same definition of matrix multiplication, so [A(B+C)]ij=[AB]ij+[AC]ij=[AB+AC]ij[A(B+C)]_{ij} = [AB]_{ij} + [AC]_{ij} = [AB+AC]_{ij} for every i,ji, j. Since every entry matches, A(B+C)=AB+ACA(B+C) = AB + AC. The proof used only that real-number multiplication distributes over addition, applied once inside each sum — the matrix property is inherited directly from the number property, exactly as with the other "surviving" laws.

Worked example

Verify the distributive property A(B+C)=AB+ACA(B+C) = AB + AC for

A=[1021],B=[1102],C=[2−110]A = \begin{bmatrix} 1 & 0 \\ 2 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix}, \quad C = \begin{bmatrix} 2 & -1 \\ 1 & 0 \end{bmatrix}

and then use the same AA and BB to check whether AB=BAAB = BA.

Step 1. Compute B+C=[3012]B + C = \begin{bmatrix} 3 & 0 \\ 1 & 2 \end{bmatrix}, adding entry by entry.

Step 2. Compute A(B+C)A(B+C): entry (1,1)(1,1) is (1)(3)+(0)(1)=3(1)(3)+(0)(1)=3; (1,2)(1,2) is (1)(0)+(0)(2)=0(1)(0)+(0)(2)=0; (2,1)(2,1) is (2)(3)+(1)(1)=7(2)(3)+(1)(1)=7; (2,2)(2,2) is (2)(0)+(1)(2)=2(2)(0)+(1)(2)=2. So A(B+C)=[3072]A(B+C) = \begin{bmatrix} 3 & 0 \\ 7 & 2 \end{bmatrix}.

Step 3. Compute ABAB and ACAC separately. ABAB: (1,1)=(1)(1)+(0)(0)=1(1,1)=(1)(1)+(0)(0)=1; (1,2)=(1)(1)+(0)(2)=1(1,2)=(1)(1)+(0)(2)=1; (2,1)=(2)(1)+(1)(0)=2(2,1)=(2)(1)+(1)(0)=2; (2,2)=(2)(1)+(1)(2)=4(2,2)=(2)(1)+(1)(2)=4, so AB=[1124]AB = \begin{bmatrix} 1 & 1 \\ 2 & 4 \end{bmatrix}. ACAC: (1,1)=(1)(2)+(0)(1)=2(1,1)=(1)(2)+(0)(1)=2; (1,2)=(1)(−1)+(0)(0)=−1(1,2)=(1)(-1)+(0)(0)=-1; (2,1)=(2)(2)+(1)(1)=5(2,1)=(2)(2)+(1)(1)=5; (2,2)=(2)(−1)+(1)(0)=−2(2,2)=(2)(-1)+(1)(0)=-2, so AC=[2−15−2]AC = \begin{bmatrix} 2 & -1 \\ 5 & -2 \end{bmatrix}.

Step 4. Add: AB+AC=[1+21−12+54−2]=[3072]AB + AC = \begin{bmatrix} 1+2 & 1-1 \\ 2+5 & 4-2 \end{bmatrix} = \begin{bmatrix} 3 & 0 \\ 7 & 2 \end{bmatrix}, exactly matching A(B+C)A(B+C) from Step 2 — the distributive property holds here, confirming the general proof above.

Step 5. Now check commutativity with the same AA and BB. Compute BABA: entry (1,1)=(1)(1)+(1)(2)=3(1,1)=(1)(1)+(1)(2)=3; (1,2)=(1)(0)+(1)(1)=1(1,2)=(1)(0)+(1)(1)=1; (2,1)=(0)(1)+(2)(2)=4(2,1)=(0)(1)+(2)(2)=4; (2,2)=(0)(0)+(2)(1)=2(2,2)=(0)(0)+(2)(1)=2, so BA=[3142]BA = \begin{bmatrix} 3 & 1 \\ 4 & 2 \end{bmatrix}. Comparing with AB=[1124]AB = \begin{bmatrix} 1 & 1 \\ 2 & 4 \end{bmatrix} from Step 3, the two matrices are clearly different. Answer: A(B+C)=AB+AC=[3072]A(B+C) = AB+AC = \begin{bmatrix} 3 & 0 \\ 7 & 2 \end{bmatrix} confirms the distributive law, while AB≠BAAB \neq BA confirms multiplication is not commutative for these matrices.

Competitive stretch

The same A,BA, B also illustrate why cancellation fails: since AB≠BAAB \neq BA, an equation like AX=ABAX = AB cannot generally be rearranged to "cancel" AA and compare XX with BB on the wrong side — the side on which a matrix multiplies matters, and swapping sides silently assumes commutativity that matrices do not have.

Common traps

  • Assuming AB=BAAB = BA out of habit from ordinary arithmetic — always check with an explicit example, as done above, before relying on commutativity.
  • Cancelling a matrix from both sides of an equation like AB=ACAB = AC to conclude B=CB = C — this is invalid in general unless AA is known to be invertible.
  • Applying associativity or distributivity without first confirming the relevant products or sums are actually defined, i.e. that the orders match up correctly.
  • Treating AI=IA=AAI = IA = A as meaning the identity matrix II behaves like the number 11 in every respect — it does not restore commutativity for other matrices.

Ask the tutor: Want to see why associativity of matrix multiplication holds in general, or try building your own 2×22\times2 counterexample for AB≠BAAB \neq BA? Ask the AI tutor to work through it with you.

Why does matrix addition keep all the nice properties but matrix multiplication does not?

Addition is defined entry by entry: you simply add the corresponding numbers in each position, so every property of ordinary number addition — commutativity, associativity, an identity, inverses — carries straight over. Multiplication is defined differently: the (i,j)(i,j) entry of ABAB mixes an entire row of AA with an entire column of BB. That row-times-column recipe treats AA and BB asymmetrically, so there is no reason swapping their order should give the same numbers, and usually it does not.

Do I need to memorise a proof for AB not equal to BA, or is a counterexample enough?

For CBSE Class 12, a clear numerical counterexample with specific 2×22\times2 matrices is exactly what is expected and what appears in the syllabus — you are not asked to prove noncommutativity in general, only to demonstrate that it can fail. The worked example above, where AB≠BAAB \neq BA for a specific A,BA, B, is the standard way to answer such a question. Keep the arithmetic careful and show both products fully.

If AB = O does not mean A = O or B = O, can I ever cancel matrices in an equation?

Only under an extra condition: if AA is invertible, you can multiply both sides of AB=ACAB = AC by A−1A^{-1} on the left to get B=CB = C, because A−1A=IA^{-1}A = I cancels cleanly. Without knowing AA is invertible, cancellation is not valid, exactly as AB=OAB = O with nonzero A,BA, B shows — matrices can multiply to zero without either factor being zero, so there is no general "divide both sides" move the way there is for ordinary numbers.

Before this

Where this leads