Rows and Columns in a Matrix
This page follows the JoeCMath video Are you mixing up rows and columns? The video gives a quick reminder that in an $m\times n$ matrix, $m$ counts rows and $n$ counts columns.
Main Idea
The video’s main reminder is simple:
\[m\times n=\text{rows}\times\text{columns}.\]Read the picture this way: a row is a horizontal strip, and a column is a vertical strip.
For example, the video thumbnail shows the matrix
\[A= \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}.\]This matrix has $3$ rows and $2$ columns, so its dimensions are
\[3\times 2.\]Watch this section: matching $m$ by $n$ to rows and columns at 0:00.
General Matrix Form
The video then moves from a concrete matrix to the general form. A matrix with $m$ rows and $n$ columns can be written as
\[A= \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}.\]The subscript on $a_{ij}$ also uses the rows-first convention:
\[a_{ij}=\text{entry in row } i \text{ and column } j.\]So $a_{23}$ means row $2$, column $3$. The first subscript tells you which row to move to, and the second subscript tells you which column to move to.
Watch this section: general matrix form overview at 0:15.
Matching an Index to an Entry
Using
\[A= \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix},\]the entries are read by row first and column second.
| Entry | How to read it | Value |
|---|---|---|
| $a_{11}$ | Row $1$, column $1$ | $1$ |
| $a_{12}$ | Row $1$, column $2$ | $4$ |
| $a_{21}$ | Row $2$, column $1$ | $2$ |
| $a_{22}$ | Row $2$, column $2$ | $5$ |
| $a_{31}$ | Row $3$, column $1$ | $3$ |
| $a_{32}$ | Row $3$, column $2$ | $6$ |
This is where the video’s rows-before-columns reminder matters most. If the index order gets flipped, the entry you land on changes, and sometimes the entry you ask for does not exist.
Watch this section: match index to value in a matrix examples at 1:07.
Why Dimensions Matter
Dimensions are not just labels. They tell you what operations are possible later.
For example, the matrix in this video is $3\times 2$. That means:
- it has $3$ horizontal rows,
- it has $2$ vertical columns,
- entries can have row numbers $1$, $2$, or $3$,
- entries can have column numbers $1$ or $2$.
So $a_{32}$ exists, but $a_{23}$ does not exist for this matrix because there is no third column.
The same rows-first idea is used again when matrices are added, multiplied, or turned into augmented matrices for systems of equations.
Watch this section: match index to value in a matrix examples at 1:07.
Timestamp Guide
Related Matrix Work
This quick reminder fits before the Matrix Addition and Subtraction companion, the Matrix Multiplication companion, and the Augmented Matrices companion.
For more matrix lessons, use the JoeCMath Linear Algebra playlist.