# Square Matrix – Definition and Examples

Here you will learn what is the square matrix definition and order of square matrix with examples.

Let’s begin –

## Square Matrix

Definition : A matrix in which the number of rows is equal to the number of columns, say n, is called a square matrix of order n.

A square matrix of order n is also called a n-rowed square matrix. The element $$a_{ij}$$ of a square matrix A = $$[a_{ij}]_{n\times n}$$ for which i = j i.e. the elements $$a_{11}$$, $$a_{22}$$, …. , $$a_{nn}$$ are called the diagonal elements and the line along which they lie is called the principal diagonal or leading diagonal of the matrix.

The order of a square matrix is $$n \times n$$.

The general form of square matrix is $$\begin{bmatrix}a_{11} & a_{12} & …… & a_{1n} \\ a_{21} & a_{22} & …… & a_{2n}\\ . & . & . \\ a_{n1} & a_{n2} & …… & a_{nn} \end{bmatrix}$$

## Examples :

1). $$\begin{bmatrix} 2 & 1 & -1 \\ 3 & -2 & 5 \\ 1 & 5 & -3 \end{bmatrix}$$ is a square matrix.

The order of above matrix is $$3 \times 3$$ and diagonal elements are 2, -2 and -3.

2). $$\begin{bmatrix} 2 & 1 \\ 3 & -2 \end{bmatrix}$$ is a square matrix.

The order of above matrix is $$2 \times 2$$ and diagonal elements are 2, -2.

3). $$\begin{bmatrix} 2 & 1 & -1 & 4 \\ 3 & -2 & 5 & 1 \\ 1 & 5 & -3 & 2 \\ 4 & 5 & 7 & 9 \end{bmatrix}$$ is a square matrix.

The order of above matrix is $$4 \times 4$$ and diagonal elements are 2, -2, -3 and 9.