• Category
  • >Machine Learning
  • >Statistics

14 Types of Matrices in Linear Algebra

  • Bhumika Dutta
  • Aug 04, 2021
14 Types of Matrices in Linear Algebra title banner

Introduction

 

We all have heard about matrices in mathematics and probably know the basics of matrix calculation. A Matrix is a rectangular table containing numbers, symbols, or variables that are arranged in rows and columns and are used to represent some particular properties of a mathematical object. Given below is a matrix with ‘m’ number of rows and ‘n’ number of columns.


image 1

An m x n matrix


All of the elements in the aforementioned matrix are denoted by the variable ‘a' along with two integers as its subscripts, which represent the number of rows and columns of the element, therefore defining its position. For instance, a11 indicates that this element appears in the first row and first column.

 

Matrices are not only limited to mathematics, they are also used in Machine learning.  Machine learning enables a machine to learn different things from its experiences without the involvement of human intelligence

 

Many types of matrices are involved in linear algebra along with vectors. In this article, we will discuss the different types of matrices in linear algebra that are relevant to machine learning.

 

Types of Matrices in Linear algebra

 

  1. Null Matrix

 

If all the elements in a matrix are zero, then the matrix is called a zero matrix or null matrix. It is generally denoted by 0. 

 

Thus, for A= [ai j ], m x n is a zero matrix if ai j = 0 for all values of i and j.

 

For example, a 2 x 2 null matrix would be:

 

 image 2

And, a 3 x3 null matrix would be:

 

image 3

 

  1. Row matrix

 

The matrix which has only one row is known as a Row matrix. Since the row matrix is constructed with a single row, the number of columns does not matter. And the order of a row matrix will always be equal to 1 x n where n is the number of columns.

 

Thus, A = [ai j ]  m x n is a row matrix if m = 1.

 

For example, a 1 x 3-row matrix would be:


image 4

(Also read: Matrix functions in R)

 

  1. Column Matrix

 

Any matrix that has only one column is known as a column matrix. Here, the number of rows does not play any significant role. The order of any column matrix would be m x 1 where m is the number of rows.

 

Thus, A= [ ai j ] m x n is a column matrix if n is always equal to 1.

 

For example, a 3 x 1 column matrix would be:

image 5

 

  1. Rectangular matrix

 

A matrix formed by different numbers of rows and columns is known as a rectangular matrix. The order of a rectangular matrix is denoted as m x n where m is the number of rows and n is the number of columns and m is not equal to n.

 

Thus, A= [ ai j ] m x n is a rectangular matrix if m ≠ n.

 

For example, a 2 x 3 matrix would be,

image 6

(Must read: Dijkstra’s Algorithm: The Shortest Path Algorithm)

 

  1. Square matrix

 

If the number of rows in a matrix is equal to the number of columns, then the matrix is known as a square matrix. This comes from the logic that a square has all its sides equal. So, in a m x n square matrix, m is equal to n. 

 

Thus, A = [ ai j ] m x n is a square matrix if m = n.

 

For example, a 2 x 2 matrix is
 

image 7

 

  1. Triangular Matrix

 

If all the elements above or below the principal diagonal in a square matrix are zero, then the matrix is known as a triangular matrix. There are two types of triangular matrices, namely upper triangular matrix and a lower triangular matrix. 

 

For example, given below in a 3 x 3 upper triangular matrix, as all the zero elements are above the principal diagonal.

 

image 8

 

And, this is a 3 x 3 lower triangular matrix, as all the zero elements are below the principal diagonal.

 

image 9

 

(Must catch: Branches of Discrete Mathematics)

 

  1. Vertical matrix

 

In a matrix, if the number of rows is more than the number of columns, then it is known as a vertical matrix. Thus, in a vertical matrix of order m x n, m>n, where m is the number of rows and n is the number of columns.

 

For example, given below is a 4 x 2 vertical matrix:

image 10

 

  1. Horizontal matrix

 

Similar to a Vertical matrix, a Horizontal matrix is one where the number of columns is more than the number of rows. Thus in a horizontal matrix of order m x n, m<n, where m is the number of rows and n is the number of columns.

 

For example, given below is a horizontal matrix of order 2 x 4:

 

image 11

 

  1. Diagonal Matrix

 

In any matrix, if all the elements, except the elements of the principal diagonal, are equal to zero, then the matrix is known as a diagonal matrix. It is like a combination of both upper and lower triangular matrices. It is not required for a diagonal matrix to be a square matrix. 

 

In other words, if a square matrix has a non-zero determinant that means it is a regular/non-singular matrix.

 

For example, given below is a 3 x 3 matrix where only the principal diagonal has non-zero elements.

 

image 12

 

  1. Symmetric matrix

 

A square matrix that is equal to its transpose matrix is known as a symmetric matrix. Thus, for a matrix A = [ ai j ] m x n, it is symmetric if ai j = aj i , for all values of i and j.

 

Given below is an example of a 3 x 3 symmetric matrix.

 

image 13

 

Antisymmetric matrix, on the other hand, is the opposite of a symmetric matrix that verifies the equation Ai j = - Aj i .

 

  1. Skew-symmetric matrix

 

A skew-symmetric matrix is a symmetric matrix in which all the elements of the principal diagonal are equal to zero. That is, in a skew-symmetric matrix A = [ ai j ], ai j = aj i for all values of i and j, but all the elements of the principal diagonal are 0.

 

For example, given below is a 3 x 3 skew-symmetric matrix:

 

image 14

 

(Recommended read: What is Confusion Matrix?)

 

  1. Identity Matrix

 

In a square matrix, if all the elements of the principal diagonal are equal to 1 and all the other elements are equal to 0, then the matrix is known as the Identity matrix. It is also called a unit matrix and a unit matrix of order n can be written as In. An identity matrix does not change any vector if multiplied. 

 

For example, this is a 3 x 3 identity matrix:

image 15

 

  1. Scalar Matrix

 

A scalar matrix is similar to a diagonal matrix in a way that all the elements above and below the principal diagonal should be equal to 0. The only difference between a scalar matrix and a diagonal matrix is that in a scalar matrix, all the elements of the principal diagonal should be equal.

 

For example, given below is an example of the scalar matrix:

image 16

 

  1. Transpose matrix

 

A transpose matrix of a matrix is another matrix in which the elements of the rows and columns have switched their positions, that is the rows have turned into columns and the columns into rows. 

 

Consider the example given below where A is a 3 x 3 matrix and At is the transpose matrix of A. In both the matrices, the principal diagonal remains the same.

 

image 17

 

The procedure of finding the transpose of any matrix is given below:

 

image 18

 

(Recommended blog: Dijkstra’s Algorithm: The Shortest Path Algorithm)

 

Some other types of matrices are:

 

  • Singular Matrix: A square matrix that has no inverse is called a singular matrix. 

 

  • Idempotent Matrix: A matrix is said to be Idempotent if matrix A = A2.

 

  • Involutory Matrix: The matrix A is involutory if A2 = I, where I is an identity matrix. An involutory matrix is its own matrix inverse.

 

  • Orthogonal Matrix: A matrix is orthogonal if it verifies that, A.At = I, I is the identity matrix.

 

  • Regular Matrix: A non-singular matrix is also known as a regular matrix. A regular matrix has its own inverse. In other words, if a square matrix has a non-zero determinant that means it is a regular/non-singular matrix.


 

Conclusion

 

There are a lot of calculations that are easier to do with the help of matrices. In this article, we have discussed different types of matrices and their properties that are important in linear algebra. Matrices are linear mappings that may be computed explicitly in linear algebra. 

 

(Suggested read: 10 Types of Statistical Data Distribution Models)

 

As a result, matrices are an important element of linear algebra, and most characteristics and operations in abstract linear algebra may be represented in terms of matrices. It should also be known that all matrices are not related to linear algebra. 

Latest Comments

  • Ferdinand Nkikabahizi

    Sep 06, 2022

    images need to be appeared, try to make theme visible