A matrix is a rectangular array of numbers. Its order $m\times n$ says how many rows and columns it has, and $a_{ij}$ names the entry in row $i$ and column $j$.
A stationery chain keeps a weekly record of how many pens, notebooks and geometry boxes each of its four branches sold. Written as a paragraph the record is hard to read; written as a table with one row per item and one column per branch it can be read at a glance โ and, more importantly, it can be calculated with. Add two weeks' tables to get a fortnight's sales; multiply by a price list to get the takings. A rectangular table of numbers treated as a single object is called a matrix.
Matrices are everywhere once you look: a digital photograph is a matrix of pixel brightnesses, a cricket scorecard is a matrix of runs, balls and boundaries, a railway timetable is a matrix of times. Before we can calculate with them we need a precise vocabulary โ how to name a matrix, describe its shape, point to a single entry, and decide when two matrices are equal. That vocabulary is this section.
Matrices, Order and Entries
๐ Definition 3.1 โ Matrix, order and entries
A matrix is a rectangular arrangement of numbers (or functions) in rows and columns, enclosed in brackets. The numbers are its entries (or elements). A matrix with $m$ rows and $n$ columns has order $m\times n$ (read โ$m$ by $n$โ) and $mn$ entries. The entry in row $i$ and column $j$ is written $a_{ij}$, and the whole matrix is written $A=[a_{ij}]_{m\times n}$:
$$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}$$
The first subscript is always the row, the second the column. Matrices are named by capital letters $A,B,C,\dots$ and their entries by the matching small letters. In this course every entry is a real number.
The rows run across, the columns run down โ the same convention as a spreadsheet, where cell C2 sits in row 2 and column C. The order is a pair of numbers, not their product: a $2\times3$ matrix and a $3\times2$ matrix both have six entries, but they are different shapes.
โ๏ธ Example 1 โ Sales data as a matrix
A stationery chain sold the following in one week (rows: items; columns: branches in Delhi, Pune, Kochi and Guwahati, in that order):
$$A=\begin{bmatrix}120&95&140&80\\60&75&50&90\\25&30&20&35\end{bmatrix}$$
Row 1 is pens, row 2 notebooks, row 3 geometry boxes. (a) State the order of $A$ and the number of entries. (b) Find $a_{23}$ and $a_{32}$ and say what each means. (c) Which entry is $140$? (d) How many notebooks were sold in all, and how many items were sold in Guwahati?
๐ก Show solutionโถ
(a) $3$ rows and $4$ columns: order $3\times4$, with $3\times4=12$ entries.
(b) $a_{23}$ is in row 2, column 3: $a_{23}=50$ โ the Kochi branch sold $50$ notebooks. $a_{32}$ is in row 3, column 2: $a_{32}=30$ โ Pune sold $30$ geometry boxes. Note $a_{23}\ne a_{32}$: the order of the subscripts matters.
(c) $140$ is in row 1, column 3, so it is $a_{13}$ (pens sold in Kochi).
(d) Notebooks are row 2: $60+75+50+90=275$. Guwahati is column 4: $80+90+35=205$ items.
Check Click the cells in Interactive 1 below: it reads each entry back with its meaning and its row and column totals.
Interactive 1 โ Reading a Matrix: Row i, Column j
This is the sales matrix of Example 1. Play walks through the entries in order $a_{11},a_{12},\dots,a_{34}$: the row $i$ and the column $j$ light up and cross at the entry $a_{ij}$. Click any cell to stop on it. Switch the data to see that the same notation works for any table.
position (i, j)โ
entryโ
row totalโ
column totalโ
How many shapes can a matrix with a given number of entries have? An $m\times n$ matrix has $mn$ entries, so the possible orders are just the ways of writing that number as a product of two positive integers.
๐ Theorem 3.1 โ Possible orders of a matrix
Let $N$ be a positive integer. A matrix with exactly $N$ entries can have order $m\times n$ if and only if $m$ and $n$ are positive integers with $mn=N$. Hence the number of possible orders equals the number of positive divisors of $N$; in particular, if $N$ is prime the only orders are $1\times N$ and $N\times1$.
Why. Each of the $m$ rows holds $n$ entries, so there are $mn$ entries in all; conversely, for any factorisation $N=mn$ we can arrange $N$ numbers in $m$ rows of $n$. Each divisor $m$ of $N$ gives exactly one order $m\times\tfrac Nm$, so orders and divisors match one to one.
โ๏ธ Example 2 โ Listing possible orders
(a) List all possible orders of a matrix with $24$ entries. (b) What if it has $13$ entries?
๐ก Show solutionโถ
(a) The divisors of $24$ are $1,2,3,4,6,8,12,24$. Pairing each $m$ with $\tfrac{24}{m}$: $1\times24,\ 2\times12,\ 3\times8,\ 4\times6,\ 6\times4,\ 8\times3,\ 12\times2,\ 24\times1$ โ eight orders.
(b) $13$ is prime, so by Theorem 3.1 the only orders are $1\times13$ and $13\times1$.
Note $4\times6$ and $6\times4$ count as different orders โ a common slip is to list only one of each pair.
Board papers often describe a matrix by a rule for its entries instead of listing them: โ$A=[a_{ij}]_{2\times3}$ with $a_{ij}=i+j$โ. To build it, substitute every pair $(i,j)$ โ row number first โ and place the result in row $i$, column $j$.
โ๏ธ Example 3 โ Constructing a matrix from a rule
(a) Construct the $2\times3$ matrix with $a_{ij}=\dfrac{(i+2j)^2}{2}$. (b) Construct the $3\times4$ matrix with $a_{ij}=\tfrac12\left|-3i+j\right|$.
Check Spot-check one entry: $b_{32}=\tfrac12|-9+2|=\tfrac72$. โ (Interactive 2 builds both matrices entry by entry.)
Interactive 2 โ Build a Matrix from a Rule for aแตขโฑผ
Choose an order and a rule (or type your own in terms of i and j, using + - * / ^ ( ), abs( ), max( , ), min( , )). Play fills the matrix one entry at a time and shows the substitution; the readouts name every type the finished matrix belongs to. Use it to check Exercise II.
orderโ
current entryโ
typesโ
Types of Matrices
Some shapes and some patterns of entries are so common that they have names. You will meet every one of them again in the rest of this chapter and in Chapter 4 (Determinants).
๐ Definition 3.2 โ Row, column and square matrices
A row matrix has exactly one row: order $1\times n$, e.g. $\begin{bmatrix}3&-1&0&7\end{bmatrix}$ is $1\times4$.
A column matrix has exactly one column: order $m\times1$, e.g. $\begin{bmatrix}2\\5\end{bmatrix}$ is $2\times1$.
A square matrix has as many rows as columns: order $n\times n$, also called a square matrix of order $n$. Its entries $a_{11},a_{22},\dots,a_{nn}$ (those with $i=j$) form the main diagonal (or leading diagonal), running from the top-left corner to the bottom-right corner.
๐ Definition 3.3 โ Diagonal, scalar and identity matrices
Let $A=[a_{ij}]_{n\times n}$ be a square matrix.
$A$ is a diagonal matrix if every entry off the main diagonal is zero: $a_{ij}=0$ whenever $i\ne j$. (The diagonal entries themselves may be anything, including $0$.)
$A$ is a scalar matrix if it is diagonal and all its diagonal entries are equal: $a_{ij}=0$ for $i\ne j$ and $a_{ii}=k$ for every $i$, for one fixed number $k$.
$A$ is the identity matrix (or unit matrix) of order $n$, written $I_n$ or simply $I$, if it is the scalar matrix with $k=1$: $a_{ij}=1$ when $i=j$ and $a_{ij}=0$ when $i\ne j$.
A matrix of any order whose entries are all zero is a zero matrix (or null matrix), written $O$ (or $O_{m\times n}$ when the order needs to be shown). For example, $\begin{bmatrix}0&0&0\end{bmatrix}$ and $\begin{bmatrix}0&0\\0&0\end{bmatrix}$ are both zero matrices, of different orders.
square โ diagonala diagonal matrix is a square matrix with zeros off the main diagonal
zero matrix $O$any order; a square zero matrix is also a scalar matrix (with $k=0$)
โ๏ธ Example 4 โ Naming the type
Give every name from Definitions 3.2โ3.4 that fits each matrix, with its order.
$$P=\begin{bmatrix}3\end{bmatrix}$$
$$Q=\begin{bmatrix}2&0&0\\0&2&0\\0&0&2\end{bmatrix}$$
$$R=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$$
$$S=\begin{bmatrix}0&0&0\end{bmatrix}$$
$$T=\begin{bmatrix}1&0&0\\0&1&0\end{bmatrix}$$
๐ก Show solutionโถ
P Order $1\times1$: it has one row and one column, so it is a row matrix, a column matrix and a square matrix. With no off-diagonal entries at all, it is also diagonal and scalar ($k=3$) โ but not the identity, since $3\ne1$.
Q Order $3\times3$: square, diagonal, and scalar with $k=2$. Not the identity.
R Order $2\times2$: square and diagonal, but not scalar, because its diagonal entries $1$ and $-1$ are different.
S Order $1\times3$: a row matrix and a zero matrix. It is not square, so it is not diagonal or scalar.
T Order $2\times3$: it looks like part of $I_3$, but it is not square, so it is none of diagonal, scalar or identity. It is just a $2\times3$ matrix.
โ ๏ธ Common mistakes when studying alone
1. Rows first, always. Order is โrows ร columnsโ and $a_{ij}$ is โrow $i$, column $j$โ. Reading $a_{23}$ as column 2, row 3 gives a different entry (Example 1: $a_{23}=50$ but $a_{32}=30$).
2. A matrix is not a number. A matrix has no single โvalueโ; it is the whole table. Do not add up its entries unless a question asks for that, and do not confuse the brackets $[\ ]$ with the vertical bars of a determinant (Chapter 4).
3. Diagonal, scalar and identity matrices must be square. $\begin{bmatrix}1&0&0\\0&1&0\end{bmatrix}$ is not an identity matrix.
4. Zeros on the diagonal are allowed. $\begin{bmatrix}4&0\\0&0\end{bmatrix}$ is a diagonal matrix: the definition only demands zeros off the diagonal.
5. โ$O$โ has many sizes. The $2\times2$ zero matrix and the $2\times3$ zero matrix are different matrices; the order is part of the matrix.
Equality of Matrices
๐ Definition 3.5 โ Equal matrices
Two matrices $A=[a_{ij}]$ and $B=[b_{ij}]$ are equal, written $A=B$, if (i) they have the same order, and (ii) every pair of corresponding entries is equal: $a_{ij}=b_{ij}$ for all $i$ and $j$.
So one matrix equation between two $m\times n$ matrices is really $mn$ ordinary equations, one for each position โ and all of them must hold at the same time. That is how Board questions use equality: to find unknown entries.
๐งญ Problem-solving strategy โ unknowns from equal matrices
Check that the two matrices have the same order (otherwise they can never be equal).
Write one equation for each position, entry by entry.
Solve the simplest equations first and substitute into the others.
Check every equation with your values โ including those you did not use. If one fails, there is no solution.
โ๏ธ Example 5 โ Four unknowns
Find $x,y,z,w$ if
$$\begin{bmatrix}x+y&2y-z\\x-y&z+w\end{bmatrix}=\begin{bmatrix}7&1\\-1&4\end{bmatrix}$$
๐ก Show solutionโถ
Equations Both matrices are $2\times2$. Comparing entries: $x+y=7$, $2y-z=1$, $x-y=-1$, $z+w=4$.
Solve Adding the first and third: $2x=6$, so $x=3$ and $y=4$. Then $z=2y-1=7$ and $w=4-z=-3$.
(a) Are $\begin{bmatrix}1&2\end{bmatrix}$ and $\begin{bmatrix}1\\2\end{bmatrix}$ equal? (b) Find all real $x$ with $\begin{bmatrix}x^2&1\\0&x\end{bmatrix}=\begin{bmatrix}4&1\\0&-2\end{bmatrix}$. (c) Is there a real $x$ with $\begin{bmatrix}x^2&1\\0&x\end{bmatrix}=\begin{bmatrix}4&1\\0&3\end{bmatrix}$?
๐ก Show solutionโถ
(a) No. They contain the same numbers, but the first is $1\times2$ and the second is $2\times1$; matrices of different orders are never equal.
(b) We need $x^2=4$ and $x=-2$. The first allows $x=\pm2$; the second picks $x=-2$, and it satisfies the first. Answer: $x=-2$ only.
(c) We need $x^2=4$ and $x=3$. But $3^2=9\ne4$, so the two conditions contradict each other: no such $x$ exists.
Lesson Solving one entry-equation is not enough โ the values must satisfy every position at once.
Exercises
I
Order and entries. Let $A=\begin{bmatrix}2&5&-1\\0&3&7\end{bmatrix}$.
1 State the order of $A$ and the number of its entries.
2 Write down $a_{13}$, $a_{22}$ and $a_{21}$.
3 List all possible orders of a matrix with $12$ entries.
4 List all possible orders of a matrix with $7$ entries.
5 How many possible orders does a matrix with $36$ entries have? List them.
6 A matrix has $5$ rows and $20$ entries. How many columns does it have?
7 Write the $2\times2$ matrix with $a_{ij}=i+j$.
8 Write the $2\times2$ matrix with $a_{ij}=\dfrac ij$.
๐ก Show solutionsโถ
1 $2$ rows, $3$ columns: order $2\times3$, $6$ entries.
4 $7$ is prime: $1\times7$ and $7\times1$ only (Theorem 3.1).
5 $36$ has $9$ divisors, so $9$ orders: $1\times36,\ 2\times18,\ 3\times12,\ 4\times9,\ 6\times6,\ 9\times4,\ 12\times3,\ 18\times2,\ 36\times1$. ($6\times6$ is paired with itself, which is why the count is odd.)
1 Square ($2\times2$), diagonal, scalar with $k=5$. Not the identity.
2 A $3\times1$ column matrix and a zero matrix $O_{3\times1}$. Not square.
3 Diagonal: yes โ every off-diagonal entry is $0$ (a zero on the diagonal is allowed). Scalar: no, the diagonal entries $4,0,-1$ are not all equal.
4 No. An identity matrix must be square; this one is $2\times3$.
5 It is already diagonal; scalar needs $k-2=3$, so $k=5$. An identity matrix would need both diagonal entries equal to $1$, but the second is $3$: never.
6 $x+2y=7$ and $3x-y=0$. From the second, $y=3x$; then $7x=7$, so $x=1$, $y=3$. Check: $1+6=7$ โ, $3-3=0$ โ.
7 $a+2b=8$ and $2a-b=1$ give $b=2a-1$, $5a-2=8$, so $a=2$, $b=3$. Then $a-c=-1\Rightarrow c=3$ and $b+3d=9\Rightarrow d=2$. Check all four โ.
8 No: the $(1,1)$ entries force $x=3$, but then $x^2=9\ne4$.
9 $(1,1)$: $2x+1=x+3$, so $x=2$. $(1,2)$: $y^2-3y+2=0$, so $y\in\{1,2\}$. $(2,2)$: $y^2-5y+6=0$, so $y\in\{2,3\}$. Both must hold: $y=2$. Answer $x=2$, $y=2$.
IV
Reasoning and modelling.
1Marks. Asha scored $78, 85, 92, 70$, Bilal $88, 64, 75, 81$ and Chen $69, 90, 84, 77$ in Mathematics, Physics, Chemistry and English (in that order). Write the marks as a matrix $M$ with one row per student. State its order, the meaning of $m_{23}$, and which entry shows the highest Physics mark.
2 Rewrite the data of part 1 with one row per subject. What is the order now, and which entry of the new matrix equals $m_{23}$?
3 How many different $2\times2$ matrices have every entry equal to $0$ or $1$? How many of them are diagonal matrices?
4Road distances. By road, DelhiโAgra is about $230$ km, DelhiโJaipur about $280$ km and AgraโJaipur about $240$ km. Write the $3\times3$ matrix $D$ with $d_{ij}=$ distance from city $i$ to city $j$ (order Delhi, Agra, Jaipur). What do you notice about the main diagonal, and about $d_{ij}$ and $d_{ji}$?
5 True or false, with a reason: (a) every scalar matrix is diagonal; (b) every diagonal matrix is scalar; (c) every zero matrix is square; (d) every identity matrix is a scalar matrix.
6 A matrix is both a row matrix and a column matrix. What is its order?
๐ก Show solutionsโถ
1
$$M=\begin{bmatrix}78&85&92&70\\88&64&75&81\\69&90&84&77\end{bmatrix}$$
Order $3\times4$. $m_{23}=75$ is Bilal's Chemistry mark. The Physics column is $85,64,90$; the highest is $m_{32}=90$ (Chen).
2 Now $4$ rows (subjects) and $3$ columns (students): order $4\times3$. Bilal's Chemistry mark is in row 3, column 2 โ the entry in position $(3,2)$. Swapping rows and columns like this is called taking the transpose (Section 3.3).
3 Each of the $4$ entries has $2$ choices: $2^4=16$ matrices. Diagonal ones have both off-diagonal entries $0$ and free diagonal entries: $2^2=4$.
4
$$D=\begin{bmatrix}0&230&280\\230&0&240\\280&240&0\end{bmatrix}$$
The diagonal is all zeros (each city is $0$ km from itself) and $d_{ij}=d_{ji}$ (the distance is the same both ways).
5 (a) True โ a scalar matrix is a diagonal matrix with equal diagonal entries. (b) False โ $\begin{bmatrix}1&0\\0&2\end{bmatrix}$. (c) False โ $\begin{bmatrix}0&0\end{bmatrix}$ is $1\times2$. (d) True โ it is the scalar matrix with $k=1$.
How this is examined: the Board asks for orders, a matrix built from a rule for $a_{ij}$, and unknowns from equal matrices โ marks are lost by swapping $i$ and $j$ or by not checking every entry. JEE uses the vocabulary inside harder questions and likes counting matrices with a given property.
E1.Board ยท 1 mark The number of possible orders of a matrix with $18$ entries is (A) $4$ (B) $6$ (C) $8$ (D) $9$
๐ก Show solutionโถ
Idea By Theorem 3.1, count the divisors of $18$: $1,2,3,6,9,18$. Orders $1\times18,\ 2\times9,\ 3\times6,\ 6\times3,\ 9\times2,\ 18\times1$.
Answer (B) $6$. The trap is (A): counting $2\times9$ and $9\times2$ as one order.
E2.Board ยท 2 marks Construct a $2\times3$ matrix $A=[a_{ij}]$ with $a_{ij}=\dfrac{3i-j}{2}$.
E4.Board ยท Case study A school canteen in Bhopal records the number of cups of tea, samosas and glasses of juice sold on Monday, Tuesday and Wednesday as the matrix (rows: tea, samosa, juice; columns: Mon, Tue, Wed)
$$S=\begin{bmatrix}40&35&50\\60&55&70\\20&30&25\end{bmatrix}$$
(i) State the order of $S$ and the meaning of $s_{23}$. [2 marks] (ii) How many glasses of juice were sold over the three days? [1 mark] (iii) On which day was the largest total number of items sold? [1 mark]
๐ก Show solutionโถ
(i) $3\times3$ (a square matrix). $s_{23}=70$: $70$ samosas were sold on Wednesday.
E5.JEE Main(Numerical value.) Let $S$ be the set of all $3\times3$ diagonal matrices whose diagonal entries are chosen from $\{-2,-1,0,1,2\}$. The number of matrices in $S$ whose diagonal entries add up to $0$ is ______.
๐ก Show solutionโถ
Idea A diagonal matrix in $S$ is fixed by its diagonal $(a,b,c)$, so count triples from $\{-2,\dots,2\}$ with $a+b+c=0$.
Count For each $a$, we need $b+c=-a$ with $b,c\in\{-2,\dots,2\}$. The number of pairs with $b+c=s$ is $5-|s|$ for $|s|\le4$. So $a=0$: $5$; $a=\pm1$: $4$ each; $a=\pm2$: $3$ each. Total $5+4+4+3+3=19$.
Answer $19$. (A common slip is to count only the $5^3=125$ diagonal matrices, or to forget the off-diagonal entries are forced to be $0$ โ they add no choices.)
E6.JEE Advanced(One or more options correct.) Let $A=[a_{ij}]_{3\times3}$ with $a_{ij}=i^{\,j}-j^{\,i}$. Then (A) every diagonal entry of $A$ is $0$ (B) $a_{23}=-1$ (C) $A$ is a diagonal matrix (D) $a_{ij}+a_{ji}=0$ for all $i,j$
๐ก Show solutionโถ
Build $a_{12}=1-2=-1$, $a_{13}=1-3=-2$, $a_{21}=2-1=1$, $a_{23}=8-9=-1$, $a_{31}=3-1=2$, $a_{32}=9-8=1$, and $a_{ii}=i^i-i^i=0$:
$$A=\begin{bmatrix}0&-1&-2\\1&0&-1\\2&1&0\end{bmatrix}$$
Options (A) true. (B) true. (C) false โ $a_{21}=1\ne0$. (D) true: swapping $i$ and $j$ changes $i^j-j^i$ into $j^i-i^j$, its negative.
Answer (A), (B), (D). โฑ Fast route: (D) holds by the swap argument without building $A$, and (D) with $i=j$ gives $2a_{ii}=0$, which is (A). Matrices with $a_{ji}=-a_{ij}$ are the skew-symmetric matrices of Section 3.3.
๐ฌ ResearchโTeaching NexusMini project ยท about 45 minutes
Research question. How much information can one matrix hold, and how quickly can you read patterns from it? Build a rainfall matrix for four Indian states over twelve months and find out.
Why it matters. Weather services, the Census and every company accounts department store their data as matrices; the India Meteorological Department publishes monthly rainfall by state and subdivision. Reading a table correctly โ which index is the row, which is the column โ is the first skill of data science.
What to do.
From open data (for example data.gov.in, โrainfall in Indiaโ), choose four states and one recent year. Enter a matrix $R=[r_{ij}]$ in a spreadsheet: row $i$ = state, column $j$ = month. State its order.
Compute every row total (annual rainfall of a state) and every column total (rainfall of a month over the four states). Which state is wettest? Which month?
Find the largest entry $r_{ij}$ and say in words what $i$ and $j$ are. Is the wettest month the same for all four states?
Make a second matrix for another year and compare the two entry by entry. (In Section 3.2 you will subtract them as matrices.)
Tools: Spreadsheet (SUM, MAX, INDEX, MATCH); an open-data portal.
Hand in: Your $4\times12$ matrix with its source, the row and column totals, and three sentences describing the patterns, each quoting a specific entry $r_{ij}$.
Going further. Colour each cell by its size (conditional formatting) to make a โheat mapโ of the matrix. Which states have a monsoon peak, and which have two rainy seasons?
Instructor note: insist on the $r_{ij}$ notation in the write-up. Kerala or Tamil Nadu next to Rajasthan and Assam gives a striking contrast (south-west versus north-east monsoon); with INDEX(R, i, j) spreadsheets use exactly the row-first convention of Definition 3.1.
๐งช Self-check quiz
0/5 correct
Q1. The order of $\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}$ is
Q2. For $A=[a_{ij}]_{3\times3}$ with $a_{ij}=2i-j$, the entry $a_{32}$ is
Q3. Which of these is a scalar matrix?
Q4. How many possible orders does a matrix with $11$ entries have?
Q5. If $\begin{bmatrix}x&1\\2&y\end{bmatrix}=\begin{bmatrix}3&1\\2&-4\end{bmatrix}$, then $x+y$ equals