Matrix Dimensions: How to Read Rows × Columns (m × n)
Dimensions of a Matrix
The number of rows and columns of
a matrix, written in the form rows×columns.
The matrix below has 2 rows and 3 columns, so its dimensions are
2×3. This is read aloud, "two by three."
Note: One way to remember
that Rows come first and Columns
come second is by thinking of RC Cola®.
m = The number of rows (horizontal lines of entries) in the matrix
n = The number of columns (vertical lines of entries) in the matrix
Worked Example
Problem:Find the dimensions of the following matrix: A=529870363145
Step 1: Count the number of rows. Rows run horizontally across the matrix. This matrix has 3 rows.
m=3
Step 2: Count the number of columns. Columns run vertically down the matrix. This matrix has 4 columns.
n=4
Step 3: Write the dimensions as rows × columns.
Dimensions of A=3×4
Answer: Matrix A is a 3 × 4 matrix (read "three by four"). It contains 3 × 4 = 12 entries in total.
Another Example
This example covers edge cases where one dimension equals 1, producing row vectors and column vectors. It shows that even single-row or single-column arrays are still matrices with well-defined dimensions.
Problem:Two matrices are given: B=2741 and C=[358]. Find the dimensions of each.
Step 1: For matrix B, count the rows. There are 4 entries stacked vertically, so there are 4 rows.
mB=4
Step 2: Count the columns in B. Each row has only 1 entry, so there is 1 column. A matrix with a single column is called a column vector.
nB=1⇒B is 4×1
Step 3: For matrix C, count the rows. There is only 1 row of entries. A matrix with a single row is called a row vector.
mC=1
Step 4: Count the columns in C. There are 3 entries in that row.
nC=3⇒C is 1×3
Answer: Matrix B is 4 × 1 (a column vector) and matrix C is 1 × 3 (a row vector).
Frequently Asked Questions
Do rows or columns come first when writing the dimensions of a matrix?
Rows always come first, then columns. A handy mnemonic is "RC" — like RC Cola® — where R (rows) comes before C (columns). So a matrix with 5 rows and 2 columns is written as 5 × 2, never 2 × 5.
What is the difference between a 2 × 3 matrix and a 3 × 2 matrix?
A 2 × 3 matrix has 2 rows and 3 columns, while a 3 × 2 matrix has 3 rows and 2 columns. Even though both contain 6 entries, they are different shapes and are generally not interchangeable. You cannot add a 2 × 3 matrix to a 3 × 2 matrix because their dimensions do not match.
Why do matrix dimensions matter for multiplication?
To multiply matrix A (dimensions m × n) by matrix B (dimensions p × q), the inner dimensions must match: n must equal p. The resulting product matrix has dimensions m × q. If the inner dimensions don't match, the multiplication is undefined.
Dimensions of a Matrix vs. Order (or Size) of a Matrix
Dimensions of a Matrix
Order (or Size) of a Matrix
Definition
The number of rows by the number of columns, written as m × n
Means exactly the same thing — "order" and "dimensions" are synonyms for matrices
Notation
Typically written as m × n (e.g., 3 × 4)
Also written as m × n or sometimes m-by-n
When used
Common in algebra and introductory courses
Common in linear algebra and more formal contexts
Square case
When m = n, you say "n × n" or "dimensions are n × n"
When m = n, you may simply say "a matrix of order n"
Why It Matters
You need to know a matrix's dimensions before you can perform any operation on it. Matrix addition requires both matrices to have identical dimensions, and matrix multiplication requires the number of columns in the first matrix to equal the number of rows in the second. Dimensions appear constantly in algebra, statistics, computer science, and data analysis whenever information is organized into tables or grids.
Common Mistakes
Mistake: Writing columns × rows instead of rows × columns
Correction: Rows always come first. Remember the mnemonic "RC" (like RC Cola): Rows before Columns. A matrix with 2 rows and 5 columns is 2 × 5, not 5 × 2.
Mistake: Confusing the total number of entries with the dimensions
Correction: A matrix with 12 entries could be 3 × 4, 4 × 3, 2 × 6, 6 × 2, 1 × 12, or 12 × 1. Dimensions specify the shape, not just the total count. Always state both the row count and the column count.
Related Terms
Row of a Matrix — Rows determine the first number in dimensions