- Practice
- About 15 min
- 5 practice questions
Orders, products and counting matrices with given entries
Decide which products of matrices of given orders exist and what order they have, count the matrices of a given order with entries from a small set, and count symmetric, skew-symmetric and invertible ones.
If something looks wrong, please tell us.
A class of exam questions never asks you to multiply numbers at all. It asks which product exists, what its order is, or how many matrices there are with certain entries. Each of these has a short rule. The matrices are written with semicolons between rows.
Orders of products
A matrix A of order m × n can be multiplied by B of order p × q only when n = p, and the product AB has order m × q. Remember the inner numbers must match; the outer numbers give the order.
Worked example 1: which products exist?
Let A be 3 × 4, B be 4 × 2 and C be 2 × 3. Then AB exists (inner 4 = 4) and has order 3 × 2. BC exists (inner 2 = 2) with order 4 × 3. CA exists (inner 3 = 3) with order 2 × 4. The triple product ABC exists, with order 3 × 3, because AB is 3 × 2 and C is 2 × 3. BCA is 4 × 4 and CAB is 2 × 2. But BA does not exist, since B has 2 columns and A has 3 rows. Hence the existence of AB does not imply the existence of BA. For both AB and BA to exist, A must be m × n and B must be n × m.
How many matrices of a given order?
A matrix of order m × n has mn entries. If each entry can be chosen in s ways, the number of matrices is s^(mn).
The number of 2 × 3 matrices with entries 0 or 1 is 2⁶ = 64. A matrix with 12 elements can have the orders 1 × 12, 2 × 6, 3 × 4, 4 × 3, 6 × 2 and 12 × 1, so there are 6 possible orders (the number of divisors of 12, since m must divide 12).
Symmetric and skew-symmetric counts
A symmetric 3 × 3 matrix is fixed by its 3 diagonal entries and 3 entries above the diagonal, which determine those below it. With entries from {0, 1}, there are 2⁶ = 64 such matrices. A skew-symmetric 3 × 3 matrix has a zero diagonal and is fixed by the three entries a₁₂, a₁₃, a₂₃, with the entries below the diagonal being their negatives. With entries allowed from {−1, 0, 1}, each of the three free entries has 3 choices, so there are 3³ = 27 skew-symmetric matrices. If only 0 and 1 are allowed, an entry aᵢⱼ = 1 above the diagonal would force aⱼᵢ = −1, which is not allowed, so all must be 0, and there is only 1 such matrix, the zero matrix.
Worked example 2: how many are invertible?
Count the 2 × 2 matrices [a b; c d] with entries 0 or 1 that are invertible. There are 2⁴ = 16 in all, and a matrix is invertible exactly when ad − bc ≠ 0. For ad − bc = 1 we need ad = 1 and bc = 0: a = d = 1 and (b, c) is one of (0, 0), (0, 1), (1, 0), which gives 3 matrices. For ad − bc = −1 we need ad = 0 and bc = 1: b = c = 1 and (a, d) is one of (0, 0), (0, 1), (1, 0), giving 3 more. In total 6 are invertible; the other 10 are singular. Listing all 16 matrices confirms the count.
Worked example 3: diagonal matrices with a given determinant
How many diagonal 3 × 3 matrices with diagonal entries from {1, 2, 3} have determinant 6? The determinant is the product of the entries. We need three numbers from {1, 2, 3} with product 6. The only multiset is {1, 2, 3}, since 2 × 3 = 6 needs the third entry 1, and 1·1·6 is not available. The three different numbers can be arranged on the diagonal in 3! = 6 ways.
Key takeaways: the inner orders must agree and the outer orders give the result; AB existing does not mean BA exists; sᵐⁿ counts the matrices; symmetric matrices have n(n + 1)/2 free entries and skew-symmetric ones have n(n − 1)/2; invertible means non-zero determinant.
Check your understanding
-
1. If A is 3 × 4 and B is 4 × 2, the order of AB is:
- 4 × 4
- 3 × 4
- 2 × 3
- 3 × 2
Show answer
Answer: D. The inner orders (4 and 4) match, and the outer orders give 3 × 2.
-
2. If A is 3 × 4, B is 4 × 2 and C is 2 × 3, which product does not exist?
- AB
- BA
- BC
- ABC
Show answer
Answer: B. B has 2 columns, but A has 3 rows, so BA is undefined. The others are defined.
-
3. How many 2 × 2 matrices have all four entries from {0, 1}?
- 8
- 4
- 16
- 24
Show answer
Answer: C. Each of the 4 entries has 2 choices, so 2⁴ = 16.
-
4. How many 3 × 3 symmetric matrices have all entries from {0, 1}?
- 64
- 512
- 27
- 36
Show answer
Answer: A. There are 6 free entries (3 on the diagonal and 3 above it), each with 2 choices: 2⁶ = 64.
-
5. How many of the 16 matrices [a b; c d] with entries 0 or 1 are invertible?
- 10
- 8
- 6
- 9
Show answer
Answer: C. ad − bc is ±1 in 3 + 3 cases, and 0 in the other 10.
Sign in to keep track of the lessons you finish.