Skip to content
Worked Examples · Example 14

Q.If A=[100−1]A = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} and B=[0110]B = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, find ABAB and BABA, and show that AB≠BAAB \neq BA.

Puducherry CbseNCERTSubjective· 3mImportance★★★★★
32% · 58/182 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Concept understanding — Matrix Multiplication Compatibility

Matrix Multiplication Compatibility: The Inner-Dimensions Rule

You cannot multiply just any two matrices. Multiplication is defined only when their sizes line up in a specific way, and this compatibility check is always the very first step of any product.

The Idea: A Row Meets a Column

When you multiply AA by BB, you take each row of AA and pair it against each column of BB, multiply corresponding entries, and add. For that pairing to work, a row of AA must have exactly as many entries as a column of BB.

Note

Think of a handshake: each finger of one hand must meet a finger of the other. If one hand has 44 fingers and the other has 33, the handshake fails.

The Precise Statement

Let AA be m×nm \times n and BB be p×qp \times q.

A×BA \times B is defined if and only if n=pn = p — the number of columns of AA equals the number of rows of BB. The product C=ABC = AB then has order m×qm \times q.

Writing the sizes side by side, (m×n)(p×q)(m \times \mathbf{n})(\mathbf{p} \times q), the inner numbers (n,pn, p) must match; the outer numbers (m,qm, q) give the result's shape.

Why the Rule Exists

Each entry of the product is

cij=∑k=1naik bkj.c_{ij} = \sum_{k=1}^{n} a_{ik}\, b_{kj}.

Here kk runs over the columns of AA (up to nn) and the rows of BB (up to pp). If n≠pn \neq p, the sum runs out of matching terms and is meaningless — that is exactly why compatibility demands n=pn = p.

Watch out

Even when both ABAB and BABA are defined, they usually differ. For AA of order 2×32 \times 3 and BB of order 3×23 \times 2, ABAB is 2×22 \times 2 but BABA is 3×33 \times 3 — different sizes entirely. Matrix multiplication is not commutative.

Quick Check

| AA | BB | Defined? | Result | …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.