Order of a Matrix - Definition, m x n Notation, Examples

#Algebra
TL;DR
The order of a matrix is its size, written as m x n, where m is the number of rows and n is the number of columns. This article covers how to read and find the order, why the order fixes the number of elements, the matrix types defined by order (row, column, square, rectangular), and six worked examples.
BT
Bhanzu TeamLast updated on June 26, 20269 min read

What Is the Order of a Matrix?

The order of a matrix is the count of its rows and columns, written $m \times n$ and read "m by n." The first number is always the number of rows; the second is always the number of columns. A matrix with 3 rows and 4 columns has order $3 \times 4$, full stop, regardless of what the entries are.

For example:

$$A = \begin{bmatrix} 7 & 2 & 9 & 1 \ 0 & 4 & 6 & 3 \ 5 & 8 & 2 & 7 \end{bmatrix}$$

This matrix has 3 rows and 4 columns, so its order is $3 \times 4$.

Variable glossary. $m$ is the row count, $n$ is the column count. The order $m \times n$ is read aloud "m by n," and the symbol $\times$ here means "by," not multiplication of the matrix — though, as the next section shows, multiplying $m$ and $n$ does give the element count.

How Do You Find the Order of a Matrix?

Count the horizontal lines of numbers (rows), then the vertical lines (columns). Write rows first.

Take this matrix:

$$B = \begin{bmatrix} 3 & 1 \ 9 & 6 \ 4 & 2 \ 8 & 5 \end{bmatrix}$$

There are 4 rows and 2 columns, so the order is $4 \times 2$. The order is never $2 \times 4$ here, since reversing the pair describes a different shape entirely.

How Does the Order Fix the Number of Elements?

A matrix of order $m \times n$ has exactly $m \times n$ elements. Here the $\times$ really is multiplication: a $3 \times 4$ matrix holds $3 \times 4 = 12$ numbers. This is the cleanest way to check you have read the order correctly: count the entries and they must equal the product.

The reverse direction is the subtle part, and it is the most-asked follow-up question. Knowing a matrix has 12 elements does not tell you its order. Twelve factors several ways: $1 \times 12$, $12 \times 1$, $2 \times 6$, $6 \times 2$, $3 \times 4$, and $4 \times 3$, which is six possible orders for the same element count. Only when the element count is prime is the order forced: a 7-element matrix must be $1 \times 7$ or $7 \times 1$, because 7 has no other factor pair.

Types of Matrices Defined by Their Order

The order alone gives a matrix its name. These are the categories every competitor page lists, so know all of them.

  • Singleton (or singular-entry) matrix: order $1 \times 1$, a single number in brackets, e.g. $[5]$.

  • Row matrix: order $1 \times n$, exactly one row, e.g. $\begin{bmatrix} 2 & 7 & 4 \end{bmatrix}$.

  • Column matrix: order $m \times 1$, exactly one column.

  • Rectangular matrix: order $m \times n$ with $m \neq n$, rows and columns differ.

  • Square matrix: order $n \times n$, equal rows and columns. Only square matrices have a determinant, an inverse, or a diagonal worth naming.

The square case is the gateway: a symmetric matrix or an identity matrix only makes sense once rows and columns match.

Examples of the Order of a Matrix

Example 1

State the order of $\begin{bmatrix} 1 & 0 & 4 \ 2 & 5 & 3 \end{bmatrix}$.

Count the rows: 2. Count the columns: 3.

Order $= 2 \times 3$.

Final answer: The order is $2 \times 3$, and the matrix has $2 \times 3 = 6$ elements.

Example 2

Can $\begin{bmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \end{bmatrix}$ be added to $\begin{bmatrix} 7 & 8 \ 9 & 0 \ 1 & 2 \end{bmatrix}$?

This is the wrong-path-first example.

Wrong attempt. A student sees that both matrices contain 6 numbers and starts adding entry by entry, expecting a clean result.

Why it is wrong. Equal element count is not equal order. The first matrix is $2 \times 3$; the second is $3 \times 2$. Addition is defined only when both orders match exactly: same rows and same columns.

Correct. Compare orders: $2 \times 3 \neq 3 \times 2$. Addition is undefined.

Final answer: No. The matrices cannot be added because their orders differ.

Example 3

A matrix has 15 elements. List every possible order.

Find all factor pairs of 15:

$1 \times 15$

$15 \times 1$

$3 \times 5$

$5 \times 3$

Final answer: Four possible orders, namely $1 \times 15$, $15 \times 1$, $3 \times 5$, $5 \times 3$.

Example 4

A matrix has 13 elements. List every possible order.

13 is prime, so its only factor pair is 1 and 13:

$1 \times 13$

$13 \times 1$

Final answer: Only two orders are possible, $1 \times 13$ and $13 \times 1$. A prime element count always forces a row or column matrix.

Example 5

For matrices $P$ of order $2 \times 3$ and $Q$ of order $3 \times 5$, is the product $PQ$ defined, and what is its order?

For multiplication, the inner numbers must match: columns of $P$ must equal rows of $Q$.

Columns of $P = 3$; rows of $Q = 3$. They match, so $PQ$ is defined.

The product takes the outer numbers: rows of $P$ by columns of $Q$.

Order of $PQ = 2 \times 5$.

Final answer: $PQ$ is defined and has order $2 \times 5$.

Example 6

Classify $\begin{bmatrix} 6 \ 1 \ 9 \end{bmatrix}$ by its order.

It has 3 rows and 1 column.

Order $= 3 \times 1$, which is one column.

Final answer: A column matrix of order $3 \times 1$. See how multiplication of matrices treats column matrices as vectors.

Why the Order of a Matrix Matters Before Any Calculation

Order is the gatekeeper. Before you add, subtract, or multiply a single number, the orders decide whether the operation is even legal, and what shape the answer takes. Skip that check and you can fill a page with arithmetic that was doomed from the first step.

Where this bites in the real world:

  • Spreadsheets and databases. A table of 50 customers by 8 attributes is a $50 \times 8$ matrix; joining it to another table only works when the shared dimension lines up.

  • Image processing. A greyscale photo is a matrix of pixel values; its order is literally its resolution, and a filter that expects a different order returns an error, not a blurry picture.

  • Neural networks. Every layer multiplies an input matrix by a weight matrix, and the orders must chain (columns of one equal to rows of the next) or the network will not even build.

The rule "inner dimensions match, outer dimensions give the answer" for multiplication is the destination this whole topic builds toward. Get order right and the rest of matrix algebra has a foundation to stand on.

Common Errors When Working With the Order of a Matrix

Mistake 1: Writing columns before rows

Where it slips in: Reading the order off a matrix in a hurry.

Don't do this: Call a 2-row, 3-column matrix "$3 \times 2$."

The correct way: Rows always come first. The phrase to lock in is "rows by columns," in that order. The first instinct for students who think in $(x, y)$ coordinates is to lead with the horizontal count, but a matrix leads with the vertical count of rows.

Mistake 2: Assuming equal element counts mean addable matrices

Where it slips in: Adding two matrices that happen to hold the same number of entries.

Don't do this: Add a $2 \times 3$ to a $3 \times 2$ because both have 6 numbers.

The correct way: Match the full order, not the element total. Addition needs identical rows and identical columns. The habit of checking both dimensions before adding is what stops the most common matrix-arithmetic error — counting elements feels like a shortcut, but it skips the dimension that actually matters.

Mistake 3: Guessing a single order from an element count

Where it slips in: A problem that gives only the number of elements.

Don't do this: Declare that 12 elements means a $3 \times 4$ matrix.

The correct way: List every factor pair. Twelve elements allow six different orders. The second-guesser who computes one order, then doubts it, is right to doubt — there are usually several, and the question wants all of them.

The Short Version

  • The order of a matrix is its size, written $m \times n$: rows first, columns second.

  • A matrix of order $m \times n$ has exactly $m \times n$ elements, but a given element count can correspond to several orders.

  • Order alone names a matrix as singleton, row, column, rectangular, or square.

  • Addition needs identical orders; multiplication needs the inner dimensions to match and gives the outer dimensions as the result.

  • Checking the order before any operation is what keeps matrix arithmetic from failing on step one.

Practice Questions on the Order of a Matrix

Try these, then check the answers below.

  1. State the order of $\begin{bmatrix} 4 & 1 & 0 & 7 \ 2 & 9 & 5 & 3 \end{bmatrix}$ and the number of elements.

  2. A matrix has 18 elements. List every possible order.

  3. A matrix has 17 elements. List every possible order.

  4. For $P$ of order $4 \times 2$ and $Q$ of order $2 \times 6$, is $PQ$ defined? If so, what is its order?

  5. Classify $\begin{bmatrix} 3 & 8 & 1 \end{bmatrix}$ by its order.

Answer to Question 1: Order $2 \times 4$, with $2 \times 4 = 8$ elements.

Answer to Question 2: $1 \times 18$, $18 \times 1$, $2 \times 9$, $9 \times 2$, $3 \times 6$, $6 \times 3$.

Answer to Question 3: 17 is prime, so only $1 \times 17$ and $17 \times 1$.

Answer to Question 4: Inner dimensions match ($2 = 2$), so $PQ$ is defined with order $4 \times 6$.

Answer to Question 5: A row matrix of order $1 \times 3$.

Practice These Before Moving On

Practice these to solidify your understanding: write down five matrices of different shapes and state each order, then list every possible order for matrices of 8, 11, and 20 elements. For any pair you want to multiply, confirm the inner dimensions match before computing. If the row-versus-column order slips, come back to the "rows by columns" rule near the top. Next, see the square-only world of matrices and determinants.

Want a live Bhanzu trainer to walk through more order of matrix problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Does the order of a matrix change if I swap two rows?
No. Swapping rows rearranges the entries but keeps the same row and column counts, so a $3 \times 4$ matrix stays $3 \times 4$.
What is the order of a single number written in brackets?
$1 \times 1$. It is called a singleton matrix and behaves almost like an ordinary number.
How many elements does a matrix of order m x n have?
Exactly $m \times n$. A $4 \times 5$ matrix has 20 elements.
Is order the same as dimension?
In school matrix algebra, yes: "order," "size," and "dimensions" all refer to the $m \times n$ description. (In higher linear algebra, "dimension" takes on a more specific meaning for vector spaces, but that is a separate idea.)
Why does multiplication need the inner dimensions to match?
Because each entry of the product is a row of the first matrix paired term-by-term with a column of the second. That pairing only works if the row length equals the column length, the inner numbers.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →