# Types of Matrices

### Row Matrix

A matrix having only one row is called a row matrix or a row vector.

A = [a_{ij}]_{1×n}

### Column Matrix

A matrix having only one column is called a column matrix or a column vector.

A = [a_{ij}]_{m×1}

Any matrix of order 1×1 can be treated as either a row matrix or a column matrix.

### Square Matrix

A square matrix is a matrix in which the number of rows and the number of columns are equal. A matrix of order n×n is also known as a square matrix of order n.

A = [a_{ij}]_{n×n}

The elements a_{11}, a_{22}, a_{33} … a_{nn} are called **principal diagonal** or leading diagonal or main diagonal elements.

The number of elements in a square matrix of order n is n^{2}.

### Diagonal Matrix

A square matrix A = [a_{ij}]_{n×n} is said to be a diagonal matrix if a_{ij} = 0 when i ≠ j.

In a diagonal matrix, all the entries except the entries along the main diagonal are zero.

### Triangular Matrix

A square matrix in which all the entries above the main diagonal are zero is called a lower triangular matrix. If all the entries below the main diagonal are zero, it is called an upper triangular matrix.

### Scalar Matrix

A square matrix A = [a_{ij}]_{n×n} is said to be scalar matrix if a_{ij} = a if i = j and a_{ij} = 0 if i ≠ j.

A scalar matrix is a diagonal matrix in which all the entries along the main diagonal are equal.

### Identity Matrix or Unit Matrix

An identity matrix or a unit matrix is a scalar matrix in which entries along the main diagonal are equal to 1. the identity matrix of order n is represented as I_{n}.

### Zero Matrix or Null Matrix or Void Matrix

A matrix is said to be a zero matrix or null matrix if all the entries are zero, and is denoted by O.