Square Matrix
Key Formula
A=a11a21⋮an1a12a22⋮an2⋯⋯⋱⋯a1na2n⋮ann
Where:
- A = A square matrix of order n
- n = The number of rows, which equals the number of columns
- aij = The entry in row i and column j, where both i and j range from 1 to n
Worked Example
Problem: Determine whether the following matrix is a square matrix, state its order, and identify the entries on its main diagonal: A = [[2, 5, 1], [0, -3, 4], [7, 6, 8]].
Step 1: Count the number of rows. The matrix has 3 rows.
A=2075−36148
Step 2: Count the number of columns. The matrix has 3 columns.
Step 3: Compare the number of rows and columns. Since 3 = 3, the matrix is square. Its order is 3 (sometimes written as a 3×3 square matrix).
rows=columns=3
Step 4: Identify the main diagonal. The main diagonal consists of entries where the row index equals the column index: a₁₁, a₂₂, and a₃₃.
a11=2,a22=−3,a33=8
Answer: A is a square matrix of order 3. Its main diagonal entries are 2, −3, and 8.
Another Example
This example demonstrates a key property unique to square matrices: only square matrices have a determinant. The first example focused on identifying a square matrix; this one applies a computation that requires the matrix to be square.
Problem: Find the determinant of the 2×2 square matrix B = [[4, 3], [2, 5]].
Step 1: Confirm B is a square matrix. It has 2 rows and 2 columns, so it is square of order 2.
B=[4235]
Step 2: Apply the determinant formula for a 2×2 matrix: det(B) = a₁₁·a₂₂ − a₁₂·a₂₁.
det(B)=a11⋅a22−a12⋅a21
Step 3: Substitute the values from the matrix.
det(B)=(4)(5)−(3)(2)=20−6=14
Answer: det(B) = 14. Because B is a square matrix, its determinant exists and equals 14.
Frequently Asked Questions
Can a non-square matrix have a determinant?
No. The determinant is defined only for square matrices. If a matrix has different numbers of rows and columns (for example, a 2×3 matrix), you cannot compute its determinant. This is one of the most important reasons the square matrix classification matters.
What is the order of a square matrix?
The order of a square matrix is simply the number of rows (or equivalently, the number of columns) it has. A matrix with 4 rows and 4 columns is a square matrix of order 4. You may also see this written as a "4×4 matrix," but the single number 4 suffices since rows and columns are equal.
What is the main diagonal of a square matrix?
The main diagonal of a square matrix consists of all entries where the row index equals the column index: a₁₁, a₂₂, a₃₃, and so on down to aₙₙ. The main diagonal runs from the top-left corner to the bottom-right corner. Concepts like the trace (the sum of diagonal entries) and diagonal matrices depend on it.
Square Matrix vs. Rectangular (Non-Square) Matrix
| Square Matrix | Rectangular (Non-Square) Matrix | |
|---|---|---|
| Definition | Number of rows equals number of columns (n × n) | Number of rows differs from number of columns (m × n, where m ≠ n) |
| Determinant | Exists and can be calculated | Does not exist |
| Inverse | May have an inverse (if determinant ≠ 0) | Cannot have a standard inverse |
| Eigenvalues | Can be found; always has n eigenvalues (counted with multiplicity) | Eigenvalues are not defined |
| Example dimensions | 1×1, 2×2, 3×3, 4×4, … | 2×3, 4×1, 3×5, … |
Why It Matters
Square matrices appear throughout algebra and beyond. Solving systems of linear equations with methods like Cramer's rule or matrix inversion requires the coefficient matrix to be square. In more advanced courses, eigenvalues, eigenvectors, and matrix decompositions all rely on the matrix being square, making this concept foundational to linear algebra, physics, computer graphics, and data science.
Common Mistakes
Mistake: Confusing the dimensions m × n with the requirement for a square matrix. Students sometimes think a 2×4 matrix is square because 2 × 4 = 8 is a perfect square number.
Correction: A square matrix requires the number of rows to equal the number of columns (m = n), not that the product m × n is a perfect square. A 2×4 matrix has 2 rows and 4 columns, so it is not square.
Mistake: Attempting to compute the determinant or inverse of a non-square matrix.
Correction: Before calculating a determinant or inverse, always verify that the matrix is square. If the matrix is not square, these operations are undefined in the standard sense.
Related Terms
- Matrix — General concept that includes square matrices
- Row of a Matrix — Horizontal entries; must equal column count for square
- Column of a Matrix — Vertical entries; must equal row count for square
- Dimensions of a Matrix — The m × n size; square when m = n
- Determinant — Defined only for square matrices
- Identity Matrix — A special square matrix with 1s on the diagonal
- Inverse of a Matrix — Only square matrices can have an inverse
- Diagonal Matrix — A square matrix with non-zero entries only on the diagonal

![4×4 square matrix with rows [2,7,-4,0], [3,12,16,-1], [5,10,0,6], [-2,1,13,4]](s_assets/s135.gif)