← 🧮 Matrices & Special Types
Subtopic 1 of 4

1.1Matrix operations and their rules

The idea

A matrix is a rectangular table of numbers. You can add matrices of the same size, scale them, and multiply them row-by-column, but the order of multiplication matters.

Think of it like this: Putting on socks and then shoes is not the same as shoes and then socks: AB and BA are different actions.

Why it exists

Almost every "which statement is true" question here is decided by a handful of rules, and each wrong rule has a tiny counter-example.

How it works

  1. (m × n)(n × p) is defined and gives m × p: the inner sizes must match.
  2. Entry (i, j) of AB is row i of A dotted with column j of B.
  3. AB ≠ BA in general (often BA is not even defined).
  4. (AB)ᵀ = BᵀAᵀ and (AB)⁻¹ = B⁻¹A⁻¹: both reverse the order.
  5. tr(AB) = tr(BA) always, even for rectangular A and B.

Worked example: A is 2×3 and B is 3×2

AB is 2×2 and BA is 3×3, so they cannot be equal, yet tr(AB) = tr(BA) still holds. Try it in the lab and watch the trace match.

Now play with it

  • →Load the 2×2 pair and check that AB ≠ BA.
  • →Switch to the 3×3 pair and see that (A + B)² ≠ A² + 2AB + B².
AB (2×2)
511
213
BA (3×3)
123
2510
0312
(AB)ᵀ
52
1113
BᵀAᵀ
52
1113
✓ (AB)ᵀ = BᵀAᵀ (the order reverses)
✓ tr(AB) = 18 and tr(BA) = 18
RuleTrue?Note
AB = BA✗not in general; always test with a 2×2 example
(AB)ᵀ = BᵀAᵀ✓the order reverses
(AB)⁻¹ = B⁻¹A⁻¹✓if both are invertible; the order reverses
tr(AB) = tr(BA)✓even when AB and BA have different sizes
tr(ABC) = tr(ACB)✗only cyclic shifts: tr(ABC) = tr(BCA) = tr(CAB)
(A + B)² = A² + 2AB + B²✗needs AB = BA
AB = 0 ⇒ A = 0 or B = 0✗e.g. diag(1,0) · diag(0,1) = 0
A² = I ⇒ A = ±I✗diag(1, −1) is a counter-example

Most "which statement is true" questions here are decided by one of these rules. Keep one tiny counter-example in mind for each ✗.

Check yourself

Which one is true for all square matrices A and B of the same size?

Remember: Matrix multiplication is not commutative; transposes and inverses reverse the order; tr(AB) = tr(BA).
Exam notes (the dense version)

Addition and scalar multiplication work entry by entry. Multiplication is row times column and needs the inner sizes to match: (m×n)(n×p) = m×p. It is associative and distributive but not commutative: AB ≠ BA in general. Key rules: (AB)ᵀ = BᵀAᵀ, (AB)⁻¹ = B⁻¹A⁻¹ (order reverses), tr(AB) = tr(BA) even when AB and BA have different sizes, and (A + B)² = A² + AB + BA + B² (not A² + 2AB + B²).

Previous year questions: Matrices & Special Types (3)

PYQs are grouped by topic, so this is the full set for Matrices & Special Types; try the ones that match this subtopic. Open all 3 on the topic page.