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 A by B, you take each row of A and pair it against each column of B, multiply corresponding entries, and add. For that pairing to work, a row of A must have exactly as many entries as a column of B.
Note
Think of a handshake: each finger of one hand must meet a finger of the other. If one hand has 4 fingers and the other has 3, the handshake fails.
The Precise Statement
Let A be m×n and B be p×q.
A×B is defined if and only if n=p — the number of columns of A equals the number of rows of B. The product C=AB then has order m×q.
Writing the sizes side by side, (m×n)(p×q), the inner numbers (n,p) must match; the outer numbers (m,q) give the result's shape.
Why the Rule Exists
Each entry of the product is
cij=∑k=1naikbkj.
Here k runs over the columns of A (up to n) and the rows of B (up to p). If n=p, the sum runs out of matching terms and is meaningless — that is exactly why compatibility demands n=p.
Watch out
Even when both AB and BA are defined, they usually differ. For A of order 2×3 and B of order 3×2, AB is 2×2 but BA is 3×3 — different sizes entirely. Matrix multiplication is not commutative.
Quick Check
A
B
Defined?
Result
2×3
3×4
Yes
2×4
2×3
2×4
No
—
1×4
4×1
Yes
1×1
Tip
Before multiplying, write both orders side by side and circle the inner numbers. If they are equal, multiply; if not, stop — the product does not exist.
Matrix Multiplication Compatibility — the rule that the number of columns of the first matrix must equal the number of rows of the second — is one of the first checks taught in the CBSE Class 12 Matrices chapter, and "matrix multiplication rules class 12" is a common search among students preparing for board exams and JEE Main. NCERT's own solved examples emphasize checking this condition before attempting any product.
Concept: Matrix Multiplication Compatibility — the number of columns in A must equal the number of rows in B. Here A is 2×2 and B is 2×3, so AB is defined and will be 2×3.
Step 1: Compute the first row of AB by multiplying row 1 of A with each column of B:
Column 1: (6)(2)+(9)(7)=12+63=75
Column 2: (6)(6)+(9)(9)=36+81=117
Column 3: (6)(0)+(9)(8)=0+72=72
Step 2: Compute the second row using row 2 of A:
Column 1: (2)(2)+(3)(7)=4+21=25
Column 2: (2)(6)+(3)(9)=12+27=39
Column 3: (2)(0)+(3)(8)=0+24=24
Step 3: Assemble the resulting 2×3 matrix.
✓Final answer
AB=[7525117397224]
Matrix multiplication AB is defined only when the number of columns in A equals the number of rows in B. Here A is 2×2 and B is 2×3, so AB exists and is a 2×3 matrix. The product is [7525117397224].
The key idea: matrix multiplication is row‑by‑column dot products. Each entry (i,j) of AB is the dot product of row i of A with column j of B. This only works if the row length of A (its number of columns) matches the column height of B (its number of rows). Here both are 2, so we are good.
Let’s walk through it step by step.
Check compatibility
A has shape 2×2 (2 rows, 2 columns). B has shape 2×3 (2 rows, 3 columns).
The inner dimensions (the 2’s) match, so AB is defined and will be 2×3 (outer dimensions: rows of A, columns of B).
Set up the product matrix
We will compute three columns, each with two entries. Label the result as C=AB, where
C=[c11c21c12c22c13c23].
First column of C (use column 1 of B)
c11 = row 1 of A dot column 1 of B:
(6)(2)+(9)(7)=12+63=75.
c21 = row 2 of A dot column 1 of B:
(2)(2)+(3)(7)=4+21=25.
Second column of C (use column 2 of B)
c12 = row 1 of A dot column 2 of B:
(6)(6)+(9)(9)=36+81=117.
c22 = row 2 of A dot column 2 of B:
(2)(6)+(3)(9)=12+27=39.
Third column of C (use column 3 of B)
c13 = row 1 of A dot column 3 of B:
(6)(0)+(9)(8)=0+72=72.
c23 = row 2 of A dot column 3 of B:
(2)(0)+(3)(8)=0+24=24.
Assemble the result
Putting all entries together:
AB=[7525117397224].
Watch out
A common mistake is to multiply element‑wise (like aij⋅bij). That is not matrix multiplication — it is the Hadamard product, which requires same‑shaped matrices and is rarely what exam questions ask for. Always do row‑times‑column.
Tip
Notice that row 2 of A is exactly 31 of row 1. So every entry in the second row of AB will be 31 of the corresponding entry in the first row. Check: 75/3=25, 117/3=39, 72/3=24. This is a quick sanity check.
✓Final answer
The product is [7525117397224].
Method: Multiplying two matrices (row-by-column)
Use this for any product AB once you have confirmed it is defined.
Steps
Step 1: Check compatibility and the result's order.
AB exists iff columns of A = rows of B; the product is (rows of A) × (columns of B).
Step 2: Compute each entry as a dot product.
The (i,j) entry of AB is row i of A dotted with column j of B: multiply matching terms and add.
Step 3: Assemble all entries into the product matrix.
Work column by column (or row by row) so no position is missed.
Common Mistakes
Mistake 1: Multiplying entry-by-entry (Hadamard) instead of row-by-column.
Why it's wrong: matrix multiplication is a sum of products of a row and a column, not aij⋅bij. Correct approach: dot each row of A with each column of B.
Mistake 2: Pairing a row of A with a row (not a column) of B.
Why it's wrong: the second factor must be read down its columns. Correct approach: hold a row of A fixed and run down the columns of B.
Mistake 3: Getting the result's order wrong.
Why it's wrong: here A is 2×2 and B is 2×3, so AB is 2×3, not 2×2. Correct approach: outer dimensions give the order.
The expression A2+B(A+B) simplifies to (A+B)2−AB by using the distributive property of matrix multiplication. We calculate (A+B)2 and then subtract AB to find the result 431646623.
The core idea here is to simplify the given expression A2+B(A+B) using the properties of matrix algebra, specifically the distributive property of matrix multiplication over addition. We are given A+B and AB, so we should try to express the target expression in terms of these known quantities.
First, let's expand B(A+B):
B(A+B)=BA+B2
So, the expression we need to evaluate becomes:
A2+B(A+B)=A2+BA+B2
Now, let's recall the expansion of (A+B)2 for matrices:
For matrices A and B, (A+B)2=(A+B)(A+B)=A(A+B)+B(A+B)=A2+AB+BA+B2.
Watch out
It is crucial to remember that matrix multiplication is generally not commutative, meaning AB=BA. Therefore, (A+B)2 is not equal to A2+2AB+B2 unless AB=BA.
Comparing the expression we need, A2+BA+B2, with the expansion of (A+B)2, which is A2+AB+BA+B2, we can see a direct relationship.
If we subtract AB from (A+B)2, we get:
(A+B)2−AB=(A2+AB+BA+B2)−AB
=A2+(AB−AB)+BA+B2
=A2+0+BA+B2
=A2+BA+B2
This shows that A2+B(A+B)=(A+B)2−AB. This simplification is key because we are given A+B and AB directly.
Now, we can proceed with the calculations:
Calculate (A+B)2:
We are given A+B=210122202.
(A+B)2=(A+B)(A+B)=210122202210122202
Let's perform the matrix multiplication:
First row:
(2)(2)+(1)(1)+(2)(0)=4+1+0=5
(2)(1)+(1)(2)+(2)(2)=2+2+4=8
(2)(2)+(1)(0)+(2)(2)=4+0+4=8
Second row:
(1)(2)+(2)(1)+(0)(0)=2+2+0=4
(1)(1)+(2)(2)+(0)(2)=1+4+0=5
(1)(2)+(2)(0)+(0)(2)=2+0+0=2
Third row:
(0)(2)+(2)(1)+(2)(0)=0+2+0=2
(0)(1)+(2)(2)+(2)(2)=0+4+4=8
(0)(2)+(2)(0)+(2)(2)=0+0+4=4
So, (A+B)2=542858824.
Subtract AB from (A+B)2:
We are given AB=111212201.
Now, we compute (A+B)2−AB:
A2+B(A+B)=542858824−111212201
=5−14−12−18−25−18−28−22−04−1
=431646623
Comparing this result with the given options, it matches option (A).