girgit.org

Matrices

How big is it? The order of a matrix

The big ideaA matrix with m rows and n columns has order m × n, holds mn entries, and each entry has an address \( a_{ij} \): row i, column j.

In simple words

To tell a friend the size of a grid, say how many lines go across and how many go down: "4 by 3". Always say the across lines first. To point at one box, give two numbers the same way: "line 2, place 3". Two numbers for the size, two numbers for any one box.

Order: rows first, then columns

A matrix with m rows and n columns is said to have order m × n, read "m by n". It is called an m × n matrix. Here is a marks sheet for four students in Maths, Physics and Chemistry:

\[ A = \begin{bmatrix} 78 & 85 & 69 \\ 92 & 74 & 88 \\ 65 & 90 & 81 \\ 70 & 66 & 95 \end{bmatrix} \]

It has 4 rows (students) and 3 columns (subjects), so its order is 4 × 3, not 3 × 4. The number of entries is \( 4 \times 3 = 12 \). So any m × n matrix has mn elements.

The address of an entry: \( a_{ij} \)

The entry in row i and column j is written \( a_{ij} \) and called the (i, j)th element. The first small number is always the row. In the marks sheet:

  • \( a_{23} = 88 \): row 2 (the second student), column 3 (Chemistry).
  • \( a_{32} = 90 \): row 3, column 2. Swapping the two numbers moves you to a different entry.
  • \( a_{14} \) does not exist: there is no fourth column.

Try it: tap each entry asked for. Watch out for addresses that point outside the matrix.

A general m × n matrix is written out like this:

\[ A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix} \]

or, in short, \( A = [a_{ij}]_{m \times n} \), where i runs from 1 to m and j from 1 to n. The ith row is \( a_{i1}, a_{i2}, \ldots, a_{in} \); the jth column is \( a_{1j}, a_{2j}, \ldots, a_{mj} \).

Guess first: how many shapes for 12 entries?

A matrix has exactly 12 entries. Guess: how many different orders could it have? Just 3 × 4 and 4 × 3?

See what happens
Six. You need natural numbers m and n with mn = 12, and the order of the pair matters: 1 × 12, 12 × 1, 2 × 6, 6 × 2, 3 × 4 and 4 × 3. A single row of 12 and a single column of 12 count too. For 7 entries there are only two orders, 1 × 7 and 7 × 1, because 7 is prime. So: list the factor pairs of the number of entries, and count each pair both ways round (a perfect square like 9 gives 3 × 3 only once).

Try it: slide the number of entries and see every shape it can take.

Building a matrix from a rule

Sometimes the entries are given by a formula in i and j. Then you fill in each address one at a time.

Worked example

Build the 3 × 2 matrix with \( a_{ij} = |i - 2j| \).

  1. Row 1 (i = 1): \( a_{11} = |1 - 2| = 1 \), \( a_{12} = |1 - 4| = 3 \).
  2. Row 2 (i = 2): \( a_{21} = |2 - 2| = 0 \), \( a_{22} = |2 - 4| = 2 \).
  3. Row 3 (i = 3): \( a_{31} = |3 - 2| = 1 \), \( a_{32} = |3 - 4| = 1 \).

\[ A = \begin{bmatrix} 1 & 3 \\ 0 & 2 \\ 1 & 1 \end{bmatrix} \]

A safe habit: write the empty grid of addresses first, then fill each one. It stops you mixing up i and j.

How many matrices can you make?

Every entry of a 2 × 3 matrix is to be 0 or 1. Each of the 6 places has 2 choices, independently, so there are \( 2^6 = 64 \) such matrices. In general, an m × n matrix whose entries come from a set of k values can be filled in \( k^{mn} \) ways. JEE questions often start from this count and then add a condition (symmetric, a fixed trace, and so on).

Don't mix these up

  • Order m × n is rows × columns. A 2 × 3 matrix is wide (2 rows of 3); a 3 × 2 matrix is tall.
  • \( a_{ij} \) is row i, column j. \( a_{ij} \) and \( a_{ji} \) are usually different entries.
  • "Order" here means size, not the order of the numbers.

Try it. Build the 2 × 3 matrix with \( a_{ij} = i + 2j \). Then give all possible orders of a matrix with 20 entries.

Answer
\( \begin{bmatrix} 3 & 5 & 7 \\ 4 & 6 & 8 \end{bmatrix} \) (for example \( a_{23} = 2 + 6 = 8 \)). For 20 entries: 1 × 20, 20 × 1, 2 × 10, 10 × 2, 4 × 5, 5 × 4.

Words to know

Order m × n
The size of a matrix: m rows, n columns, in that order.
\( a_{ij} \)
The entry in row i, column j; also called the (i, j)th element.
\( [a_{ij}]_{m \times n} \)
Short way to write a whole m × n matrix by its general entry.
Number of elements
mn for an m × n matrix.

In the 4 × 3 marks matrix above, what is \( a_{41} \)?

  1. 70
  2. 95
  3. It does not exist

How many 2 × 2 matrices can be made if every entry is 0, 1 or 2?

  1. 12
  2. 64
  3. 81

A matrix has 5 rows and 2 columns. Which is its order?

  1. 2 × 5
  2. 5 × 2
  3. 10