Mathwords logoMathwords

Square Matrix

Square Matrix

A matrix with equal numbers of rows and columns.

 

4×4 square matrix with rows [2,7,-4,0], [3,12,16,-1], [5,10,0,6], [-2,1,13,4]

 

 

See also

Dimensions of a matrix

Key Formula

A=[a11a12a1na21a22a2nan1an2ann]A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{bmatrix}
Where:
  • AA = A square matrix of order n
  • nn = The number of rows, which equals the number of columns
  • aija_{ij} = 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=[251034768]A = \begin{bmatrix} 2 & 5 & 1 \\ 0 & -3 & 4 \\ 7 & 6 & 8 \end{bmatrix}
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\text{rows} = \text{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=8a_{11} = 2, \quad a_{22} = -3, \quad a_{33} = 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=[4325]B = \begin{bmatrix} 4 & 3 \\ 2 & 5 \end{bmatrix}
Step 2: Apply the determinant formula for a 2×2 matrix: det(B) = a₁₁·a₂₂ − a₁₂·a₂₁.
det(B)=a11a22a12a21\det(B) = a_{11} \cdot a_{22} - a_{12} \cdot a_{21}
Step 3: Substitute the values from the matrix.
det(B)=(4)(5)(3)(2)=206=14\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 MatrixRectangular (Non-Square) Matrix
DefinitionNumber of rows equals number of columns (n × n)Number of rows differs from number of columns (m × n, where m ≠ n)
DeterminantExists and can be calculatedDoes not exist
InverseMay have an inverse (if determinant ≠ 0)Cannot have a standard inverse
EigenvaluesCan be found; always has n eigenvalues (counted with multiplicity)Eigenvalues are not defined
Example dimensions1×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