A matrix is a rectangular array of numbers (or functions) arranged in horizontal rows and vertical columns and enclosed in brackets. We name matrices with capital letters and write a general matrix as $A=[a_{ij}]$, where $a_{ij}$ is the entry sitting in the $i$-th row and $j$-th column. So in
$$A=\begin{bmatrix} 2 & 7 & -1\\ 0 & 3 & 5\end{bmatrix},$$
the entry $a_{12}=7$, $a_{23}=5$ and $a_{21}=0$. Read the subscripts as "row first, column second" — this convention is used everywhere and mixing it up is the most common slip.
Order of a matrix
A matrix with $m$ rows and $n$ columns is said to be of order $m\times n$ (read "$m$ by $n$"). The order alone tells you how many entries the matrix has: an $m\times n$ matrix has exactly $mn$ entries. A neat counting fact follows — the possible orders of a matrix with a fixed number of entries $N$ are precisely the factor pairs of $N$. For example $N=12$ gives the orders $1\times12,\ 2\times6,\ 3\times4,\ 4\times3,\ 6\times2,\ 12\times1$ (six in all); a prime number of entries, say $7$, gives only $1\times7$ and $7\times1$.
Constructing a matrix from a rule
Many problems hand you a formula such as $a_{ij}=\tfrac{(i+j)^2}{2}$ and ask you to build the matrix. The recipe never changes: substitute each $(i,j)$ pair for the required order and place the value in its slot. This is the matrix version of "evaluate a function at every point of a grid".
Types of matrices
The nesting is worth memorising: identity $\subset$ scalar $\subset$ diagonal $\subset$ square. Every identity matrix is scalar (its equal diagonal value is $1$); every scalar matrix is diagonal; every diagonal matrix is square. The main diagonal of a square matrix runs from the top-left $a_{11}$ to the bottom-right $a_{nn}$, and the diagonal entries are $a_{11},a_{22},\dots,a_{nn}$.
Equality of matrices
Two matrices $A=[a_{ij}]$ and $B=[b_{ij}]$ are equal, written $A=B$, only when both conditions hold: (i) they have the same order, and (ii) their corresponding entries are equal, i.e. $a_{ij}=b_{ij}$ for every $i$ and $j$.
$$A=B \iff a_{ij}=b_{ij}\ \text{ for all } i,j \ \ (\text{and } A,B \text{ have the same order}).$$
This single idea is the engine behind every "find $x,y,z$" question: a single matrix equation is unpacked into a system of ordinary scalar equations, one per entry, which you then solve. Note that $\begin{bmatrix}1 & 2\end{bmatrix}$ and $\begin{bmatrix}1\\ 2\end{bmatrix}$ are not equal — same numbers, different orders.
Deeper Insight — order is the gatekeeper. Almost every rule in this chapter begins with a question about order. Two matrices can be added only if their orders match; they can be multiplied only if the "inner" orders match; equality demands identical order before you even look at the entries. So train yourself to write down the order of every matrix first — it tells you instantly whether an operation is even legal, and it is the cheapest way to catch a mistake before it spreads.
If $\begin{bmatrix} x+y & 2\\ 5 & x-y\end{bmatrix}=\begin{bmatrix} 7 & 2\\ 5 & 3\end{bmatrix}$, find $x$ and $y$.
SolutionEquality entry-by-entry gives $x+y=7$ and $x-y=3$. Adding: $2x=10\Rightarrow x=5$; then $y=2$.
Answer: $x=5,\ y=2$.
Construct the $2\times2$ matrix $A=[a_{ij}]$ where $a_{ij}=\dfrac{(i+j)^2}{2}$.
Solution$a_{11}=\tfrac{(2)^2}{2}=2,\ a_{12}=\tfrac{(3)^2}{2}=\tfrac92,\ a_{21}=\tfrac{9}{2},\ a_{22}=\tfrac{(4)^2}{2}=8$. So $A=\begin{bmatrix} 2 & \tfrac92\\[2pt] \tfrac92 & 8\end{bmatrix}$.
Answer: $A=\begin{bmatrix} 2 & \tfrac92\\[2pt] \tfrac92 & 8\end{bmatrix}$
How many matrices of order $2\times3$ can be formed with each entry $0$ or $1$?
SolutionThere are $2\times3=6$ positions and each independently has $2$ choices, giving $2^{6}=64$ matrices.
Answer: $2^{6}=64$ matrices.
Write the orders possible for a matrix having exactly $7$ elements.
Solution$7$ is prime, so the only factor pairs are $1\times7$ and $7\times1$ — just two possible orders.
Answer: Two orders: $1\times7$ and $7\times1$.
A matrix $A$ has $18$ elements. Write down all possible orders of $A$. If, instead, it had $5$ elements, what are the possible orders?
SolutionThe orders are the factor pairs of the number of entries. For $18$: $1\times18,\ 2\times9,\ 3\times6,\ 6\times3,\ 9\times2,\ 18\times1$ — six orders. For $5$ (prime): only $1\times5$ and $5\times1$ — two orders.
Answer: For $18$: six orders ($1\times18,\ 2\times9,\ 3\times6,\ 6\times3,\ 9\times2,\ 18\times1$); for $5$: two orders ($1\times5$ and $5\times1$).
Construct the $3\times2$ matrix $A=[a_{ij}]$ whose entries are $a_{ij}=\dfrac{|\,i-3j\,|}{2}$.
SolutionSubstitute each $(i,j)$ with $i=1,2,3$ and $j=1,2$:
Row 1: $a_{11}=\tfrac{|1-3|}{2}=1,\ a_{12}=\tfrac{|1-6|}{2}=\tfrac52$. Row 2: $a_{21}=\tfrac{|2-3|}{2}=\tfrac12,\ a_{22}=\tfrac{|2-6|}{2}=2$. Row 3: $a_{31}=\tfrac{|3-3|}{2}=0,\ a_{32}=\tfrac{|3-6|}{2}=\tfrac32$. Hence $A=\begin{bmatrix} 1 & \tfrac52\\[2pt] \tfrac12 & 2\\[2pt] 0 & \tfrac32\end{bmatrix}$.
Answer: $A=\begin{bmatrix} 1 & \tfrac52\\[2pt] \tfrac12 & 2\\[2pt] 0 & \tfrac32\end{bmatrix}$
Identify the type of each matrix: $P=\begin{bmatrix}4 & 0 & 0\\ 0 & 4 & 0\\ 0 & 0 & 4\end{bmatrix}$, $Q=\begin{bmatrix}0 & 0\\ 0 & 0\end{bmatrix}$, $R=\begin{bmatrix}1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\end{bmatrix}$.
Solution$P$ is diagonal with all diagonal entries equal ($=4$), so it is a scalar matrix. $Q$ has every entry $0$, so it is a zero (null) matrix. $R$ is a scalar matrix whose common diagonal value is $1$, so it is the identity matrix $I_3$.
Answer: $P$ is a scalar matrix, $Q$ is a zero (null) matrix, and $R$ is the identity matrix $I_3$.
Find $x,y,z$ and $w$ if $\begin{bmatrix} x+y & 2z+w\\ x-y & z-w\end{bmatrix}=\begin{bmatrix} 6 & 4\\ 2 & -1\end{bmatrix}$.
SolutionEquating entries: $x+y=6$, $x-y=2$, $2z+w=4$, $z-w=-1$. From the first pair, $2x=8\Rightarrow x=4,\ y=2$. Adding the last pair, $3z=3\Rightarrow z=1$, then $w=z+1=2$. Check $2z+w=2+2=4$. So $x=4,\ y=2,\ z=1,\ w=2$.
Answer: $x=4,\ y=2,\ z=1,\ w=2$.
For $A=\begin{bmatrix}a-b & 2a+c\\ 2a-b & 3c+d\end{bmatrix}=\begin{bmatrix}-1 & 5\\ 0 & 13\end{bmatrix}$, find $a,b,c,d$.
SolutionEntry-by-entry: $a-b=-1$, $2a-b=0$, $2a+c=5$, $3c+d=13$. Subtracting the first from the second: $a=1$; then $b=a+1=2$. From $2a+c=5$: $c=3$. From $3c+d=13$: $d=13-9=4$. So $a=1,\ b=2,\ c=3,\ d=4$.
Answer: $a=1,\ b=2,\ c=3,\ d=4$.
Write a general $3\times3$ diagonal matrix and state how many of its $9$ entries can be non-zero. How does a scalar matrix differ?
SolutionA $3\times3$ diagonal matrix has the form $\begin{bmatrix}d_1 & 0 & 0\\ 0 & d_2 & 0\\ 0 & 0 & d_3\end{bmatrix}$; only the $3$ diagonal entries $d_1,d_2,d_3$ may be non-zero, the other $6$ are forced to $0$. A scalar matrix is the special case $d_1=d_2=d_3=k$, i.e. $kI_3$; it has just one independent value.
Answer: A diagonal matrix has only its $3$ diagonal entries possibly non-zero; a scalar matrix is the special case $d_1=d_2=d_3=k$, i.e. $kI_3$.
The number of all possible $2\times2$ matrices with entries from the set $\{1,2,3\}$ is?
SolutionA $2\times2$ matrix has $4$ positions, and each can independently be filled in $3$ ways. By the multiplication principle the count is $3^{4}=81$ matrices.
Answer: $3^{4}=81$ matrices.