On this post we explain what a square matrix is, with examples of square matrices. In addition, you will see what are the properties of square matrices, the operations that can be done with them and the different types of square matrices that exist.

Table of Contents

## What is a square matrix?

The definition of square matrix is as follows:

A **square matrix** is a matrix that has the same number of rows as columns.

## Examples of square matrices

Once we know the meaning of square matrix, we are going to see several examples of square matrices to fully understand the concept:

Square matrix of order 2

Square matrix of order 3

Square matrix of order 4

As you can see, square matrices are usually named by their order, that is, a square matrix of order 2 means that it is a 2×2 dimension matrix (2 rows and 2 columns). Likewise, a square matrix of order 3 is a 3×3 dimension matrix (3 rows and 3 columns).

## Types of square matrices

Below are the most important types of square matrices that exist. Click on the type of matrix to find out why it is special.

As you can see, there are many types of square matrices, and each one has its own name for a different reason.

## Diagonals of a square matrix

The diagonals of square matrices have special names, there is the main diagonal and the secondary diagonal:

- The main diagonal of a square matrix are the elements that go from the upper left corner to the lower right corner:

- The secondary diagonal of a square matrix are the elements that go from the lower left corner to the upper right corner:

## Square matrix operations

There are certain operations that can only be performed if the matrix is square. Below are all these operations:

### Trace of a square matrix

The **trace of a matrix** is the sum of the elements that are on the main diagonal of a square matrix.

For example, the trace of the matrix above would be:

### Square matrix addition

If two square matrices have the same dimension, they can be added or subtracted. To add (or subtract) two square matrices you have to add (or subtract) the elements on the same entry.

You can find more examples in our website.

### Square matrix multiplication

Two square matrices of the same order can also be multiplied. Look at the following example of a multiplication of two square matrices of order 2:

The process of multiplying two matrices is very complicated, see how to multiply matrices in our website to learn how to do it.

### Determinant of a square matrix

Square matrices are the only matrices with which a determinant can be calculated. However, finding the determinant of a square matrix depends on its dimension:

- To solve a 2×2 determinant you just have to multiply the numbers on the main diagonal, then multiply the numbers on the secondary diagonal, and finally subtract the results.

You can find more examples of 2×2 determinants in our site.

- However, solving the determinant of a 3×3 matrix is not as easy as a 2×2 determinant. If you want to know how to calculate a 3×3 determinant, see the linked page.

Moreover, it can also be calculated the determinant of a 4×4 matrix (or even a larger dimension), but logically you should first know how to solve the determinant of a matrix of order 3.

## Properties of a square matrix

Square matrices are used a lot in linear algebra, that is why they are so important. Let’s see the characteristics that make this type of matrices so relevant:

- Any square matrix can be decomposed into a sum of a symmetric matrix and an antisymmetric matrix.

- As we’ve seen above, if two square matrices are of the same order, they can be added or subtracted.

- Two square matrices can be multiplied in both possible directions. However, the product of square matrices is not commutative, that is, the result of the multiplication will change depending on the direction in which the matrices are multiplied. Take a look at the following examples:

- On the other hand, the trace of the product of two matrices is independent of the direction of the multiplication.

- The determinant of a matrix can only be solved if the matrix is square.

- Lastly, square matrices can be diagonalized. So a change of base can be made in order to calculate the eigenvalues and the eigenvectors of almost any square matrix and transform it into a diagonal matrix.

beatriceare nilpotent and idempotent matrix types of square matrix

[email protected]Yes Beatrice, all nilpotent and idempotent matrices are square matrices.