Square Matrix - Definition, Types, Properties, and Examples

#Algebra
TL;DR
A square matrix is a matrix with the same number of rows and columns, so its order is $n \times n$. This article covers the definition, the main types (identity, diagonal, scalar, triangular, symmetric, zero), the properties that only square matrices have — trace, determinant, and an inverse — six worked examples, and where square matrices do real work.
BT
Bhanzu TeamLast updated on August 17, 202610 min read

The Grid That Rotates Every Pixel You See

Every game frame you see, a $3 \times 3$ square matrix rotates every point on your screen.

The reason a square matrix, and not just any grid of numbers, sits behind graphics, physics, and solving systems of equations is that "square" is exactly the shape that lets a matrix have a determinant and an inverse. A rectangular grid can store data. A square one can transform it and be undone. That single structural fact is what this whole topic rests on.

What Is a Square Matrix?

A square matrix is a matrix in which the number of rows equals the number of columns.

A matrix is a rectangular arrangement of numbers in rows and columns; its order (or size) is written as rows $\times$ columns. When those two counts are equal, the order is $n \times n$ for some whole number $n$, and the matrix is square. For example,

$$A = \begin{bmatrix} 2 & 5 \ 1 & 3 \end{bmatrix}$$

is a square matrix of order $2 \times 2$, while a $2 \times 3$ grid is not square because it has more columns than rows. The set of possible square orders is simply ${1 \times 1,\ 2 \times 2,\ 3 \times 3,\ \dots}$. If the order of a matrix is new to you, that idea is the foundation everything here stands on.

The entries running from the top-left to the bottom-right - the positions $a_{11}, a_{22}, a_{33}, \dots$ — form the main diagonal, a feature only square matrices have in a clean way.

What Are the Types of Square Matrices?

Square matrices come in several named forms, each defined by a pattern in its entries:

  • Identity matrix - $1$s on the main diagonal, $0$s everywhere else. It acts like the number $1$ under multiplication. See the identity matrix in full.

  • Diagonal matrix - every off-diagonal entry is $0$; the diagonal may hold any numbers. More at diagonal matrix.

  • Scalar matrix - a diagonal matrix whose diagonal entries are all equal.

  • Triangular matrix - either all entries below the diagonal are $0$ (upper triangular) or all above it are $0$ (lower triangular).

  • Symmetric matrix - the matrix equals its own transpose, so $a_{ij} = a_{ji}$.

  • Zero (null) square matrix - every entry is $0$.

$$I = \begin{bmatrix} 1 & 0 & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}, \qquad D = \begin{bmatrix} 4 & 0 & 0 \ 0 & 7 & 0 \ 0 & 0 & 2 \end{bmatrix}, \qquad U = \begin{bmatrix} 3 & 1 & 5 \ 0 & 6 & 2 \ 0 & 0 & 8 \end{bmatrix}.$$

Every one of these is square first; the type is the extra pattern layered on top.

What Are the Properties of a Square Matrix?

Several properties belong to square matrices only - a rectangular matrix simply cannot have them:

  • Main diagonal and trace. The trace is the sum of the main-diagonal entries. For $\begin{bmatrix} 2 & 5 \ 1 & 3 \end{bmatrix}$ the trace is $2 + 3 = 5$.

  • Determinant. Only a square matrix has a determinant - a single number that tells you whether the matrix can be inverted.

  • Inverse. A square matrix has an inverse exactly when its determinant is not zero. If the determinant is zero the matrix is singular and no inverse exists.

  • Powers. You can multiply a square matrix by itself, so $A^2, A^3, \dots$ all make sense. A non-square matrix cannot be raised to a power, because the shapes would not match for multiplication.

  • Transpose keeps the order. The transpose of a matrix swaps rows and columns; for a square matrix the result is the same $n \times n$ size.

The through-line is that squareness is what makes a matrix behave like a self-contained operator: it can be multiplied by itself, measured by one determinant, and - when that determinant is nonzero - reversed.

What Operations Can You Do on Square Matrices?

Two same-order square matrices can be added or subtracted entry by entry, and any two square matrices of the same order can be multiplied. Because the shapes always match, square matrices are the only ones you can freely add, multiply, and power without ever checking dimensions again. Subtraction follows the same entry-by-entry rule as addition, laid out fully in subtraction of matrices.

Is matrix multiplication commutative for square matrices? No. Even when both are square and the same size, $AB \ne BA$ in general - order still matters.

Examples Of Square Matrices

The set runs from spotting a square matrix, through the most common "square means symmetric" mix-up, to trace, determinant, and building a named type.

Example 1

Is $B = \begin{bmatrix} 7 & 2 & 1 \ 0 & 4 & 3 \end{bmatrix}$ a square matrix? State its order.

Count the rows and columns. There are $2$ rows and $3$ columns.

Since $2 \ne 3$, the counts are unequal.

Final answer: $B$ is $2 \times 3$, so it is not square.

Example 2

A student is told $M$ is a $3 \times 3$ square matrix and concludes $M$ must be symmetric. Is that right?

Wrong attempt. The reasoning goes: a square has matching sides, so a square matrix should be the same across its diagonal - meaning $M = M^{T}$, symmetric. It sounds tidy.

Test it on a real $3 \times 3$:

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

Here $a_{12} = 9$ but $a_{21} = 0$, so $M \ne M^{T}$. The matrix is square yet clearly not symmetric, so the conclusion breaks.

Correct. Being square only means rows equal columns. Symmetry is an extra condition ($a_{ij} = a_{ji}$) that most square matrices do not satisfy.

Final answer: No - every symmetric matrix is square, but not every square matrix is symmetric.

Example 3

Find the trace of $C = \begin{bmatrix} 5 & 1 & 2 \ 3 & 8 & 0 \ 7 & 4 & 6 \end{bmatrix}$.

The trace is the sum of the main-diagonal entries $5, 8, 6$.

$$\text{tr}(C) = 5 + 8 + 6 = 19.$$

Final answer: $\text{tr}(C) = 19$.

Example 4

Find the determinant of $A = \begin{bmatrix} 4 & 3 \ 2 & 1 \end{bmatrix}$, and say whether $A$ is invertible.

For a $2 \times 2$ matrix $\begin{bmatrix} a & b \ c & d \end{bmatrix}$, the determinant is $ad - bc$.

$$\det A = (4)(1) - (3)(2)$$

$$\det A = 4 - 6 = -2.$$

Since $\det A = -2 \ne 0$, an inverse exists.

Final answer: $\det A = -2$, so $A$ is invertible.

Example 5

Write the $3 \times 3$ scalar matrix whose diagonal entries are all $5$.

A scalar matrix is diagonal with equal diagonal entries, so place $5$ on the main diagonal and $0$ elsewhere.

$$S = \begin{bmatrix} 5 & 0 & 0 \ 0 & 5 & 0 \ 0 & 0 & 5 \end{bmatrix}.$$

Final answer: the matrix above, equal to $5I$ where $I$ is the $3 \times 3$ identity.

Example 6

Compute $A^{2}$ for $A = \begin{bmatrix} 1 & 2 \ 0 & 3 \end{bmatrix}$.

Powering is only possible because $A$ is square, so multiply $A$ by itself.

$$A^{2} = \begin{bmatrix} 1 & 2 \ 0 & 3 \end{bmatrix}\begin{bmatrix} 1 & 2 \ 0 & 3 \end{bmatrix}.$$

Row-by-column, the top-left entry is $(1)(1) + (2)(0) = 1$, the top-right is $(1)(2) + (2)(3) = 8$, the bottom-left is $(0)(1) + (3)(0) = 0$, and the bottom-right is $(0)(2) + (3)(3) = 9$.

$$A^{2} = \begin{bmatrix} 1 & 8 \ 0 & 9 \end{bmatrix}.$$

Final answer: $A^{2} = \begin{bmatrix} 1 & 8 \ 0 & 9 \end{bmatrix}$.

Why Do Square Matrices Matter?

"Which grids of numbers can actually be undone?" - the question that makes squareness special.

A square matrix is the mathematical shape of a reversible transformation, and that is why it turns up wherever something has to be applied and then unwound.

  • Computer graphics. Rotations, scalings, and reflections of 2D and 3D scenes are all square matrices multiplying coordinate points. The inverse matrix rotates the view back.

  • Solving systems of equations. A system of $n$ equations in $n$ unknowns is a single square-matrix equation $A\mathbf{x} = \mathbf{b}$, solvable by the inverse when $\det A \ne 0$.

  • Quantum mechanics. Heisenberg's 1925 formulation of quantum theory expressed physical observables as square matrices - the historical moment that put matrices at the centre of modern physics.

  • Markov chains and networks. Transition probabilities between $n$ states form an $n \times n$ square matrix whose powers predict long-run behaviour.

Show a learner the destination first - that the same square grid rotating a game character is what solves a bank's linear system - and the demand that rows equal columns stops looking arbitrary. At Bhanzu, trainers introduce the square matrix through its determinant and inverse, because "this is the shape you can reverse" is the idea that makes every later matrix topic click.

The Mathematicians Behind the Square Matrix

Arthur Cayley (1821–1895, England) developed the algebra of matrices in the 1850s, defining matrix multiplication and the identity and treating a square matrix as a single object you can compute with. His work turned arrays of numbers into a system with its own arithmetic, which is why square matrices behave like generalised numbers today.

Common Mistakes

Mistake 1: Assuming every square matrix is symmetric

Where it slips in: Reading "square" as "the same across the diagonal".

Don't do this: Conclude $M = M^{T}$ just because the matrix has equal rows and columns.

The correct way: Square means rows equal columns - nothing more. Symmetry ($a_{ij} = a_{ji}$) is a separate, stronger condition. The second-guesser who half-remembers the symmetric definition often folds it into "square" and loses marks on identification questions.

Mistake 2: Trying to find the determinant of a non-square matrix

Where it slips in: Any problem that hands you a $2 \times 3$ or $3 \times 2$ grid and asks for a determinant or inverse.

Don't do this: Attempt the $ad - bc$ pattern on a rectangular matrix.

The correct way: Check the order first. Determinant and inverse are defined for square matrices only. The rusher who dives into the arithmetic without checking the shape ends up computing something that does not exist.

Mistake 3: Confusing the trace with the determinant

Where it slips in: Property questions that ask for "the diagonal value" of a square matrix.

Don't do this: Add the diagonal when the determinant is wanted, or multiply when the trace is wanted.

The correct way: The trace is the sum of the main-diagonal entries; the determinant is a different quantity entirely (for $2 \times 2$, it is $ad - bc$). They agree only by coincidence, never by rule.

Conclusion

  • A square matrix has equal rows and columns, giving it order $n \times n$.

  • Its named types include the identity, diagonal, scalar, triangular, symmetric, and zero matrices.

  • Only square matrices have a trace, a determinant, an inverse, and well-defined powers.

  • A square matrix is invertible exactly when its determinant is nonzero.

  • Square matrices model reversible transformations - graphics, linear systems, and quantum observables.

To go further with a teacher, explore Bhanzu's algebra tutor sessions, a high school math tutor for the full matrices chapter, or structured math classes online.

A Practical Next Step

Practice these to lock in the idea: (1) state the order of $\begin{bmatrix} 1 & 0 \ 4 & 2 \end{bmatrix}$ and its trace; (2) find the determinant of $\begin{bmatrix} 3 & 6 \ 1 & 2 \end{bmatrix}$ and say if it is invertible; (3) write the $2 \times 2$ identity matrix. If the determinant in (2) comes out nonzero, recompute — it is a singular case worth spotting. Want a live Bhanzu trainer to walk your child through square matrices and the wider matrices chapter? Book a free demo class.

Read More

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is a square matrix?
A matrix with the same number of rows and columns, so its order is $n \times n$. A $2 \times 2$ or $3 \times 3$ matrix is square; a $2 \times 3$ matrix is not.
What is the order of a square matrix?
It is $n \times n$, where $n$ is the shared count of rows and columns. A square matrix is often called an "$n$-th order" or "$n$-square" matrix.
Do only square matrices have determinants?
Yes. The determinant and the inverse are defined for square matrices only, which is one of the main reasons squareness matters.
Is every square matrix invertible?
No. A square matrix is invertible only when its determinant is nonzero. If the determinant is zero, the matrix is singular and has no inverse.
What is the trace of a square matrix?
The sum of the entries on the main diagonal. For $\begin{bmatrix} 2 & 5 \ 1 & 3 \end{bmatrix}$ the trace is $2 + 3 = 5$.
✍️ 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 →