Javatpoint Logo
Javatpoint Logo

Matrix

Matrix is very useful in engineering calculations. Several mathematical operations involving matrices are important. In this section, we will learn about the matrix, its notation, types, operations, and applications.

What is the matrix?

The matrix is a set of numbers that are arranged in horizontal and vertical lines of entries. The horizontal entries called rows, and the vertical entries called columns. The numbers are called the elements or entries of the matrix. It is written inside a pair of square brackets []. In other words, it is an array of numbers. It is a rectangular representation of numbers in the form of an array.

Matrix Notation

Matrix is usually denoted by a capital letter and its elements denoted by the small letters along with subscript of the row and column number. The row and column are denoted by the lower-case letter m and n, respectively. The size of the matrix is defined by the number of rows and columns that it contains. A matrix with m rows and n columns is called m × n matrix. It contains a total of m × n elements. For example:

Matrix

In the above matrix, aij (i represents row number, and j represents column number) are the elements of the matrix. There are three rows and three columns, so there is a total of nine elements in the matrix.

The matrix may contain any number of rows and columns. For example:

Matrix

Types of Matrices

There are the following types of matrices:

Empty Matrix: A Matrix with no rows and no columns is called an empty matrix. For example:

[   ]

Row Matrix: A matrix that has only a row is called a row matrix. It is also known as the row vector. For example:

[4       3       6]

Column Matrix: A matrix that has only a column is called a column matrix. It is also known as the column vector. For example:

Matrix

Zero Matrix: A matrix whose all elements are zero is called a zero matrix. It is also known as the null matrix. For example:

Matrix

Square Matrix: A matrix in which row and column dimensions are equal (m=n) is called the square matrix. For example:

Matrix

Diagonal Matrix: A square matrix in which all the non-diagonal elements are zero and contain at least one no-zero element in its principal diagonal is called the diagonal matrix. For example:

Matrix

Scalar Matrix: A diagonal matrix whose all diagonal elements are equal is called the scalar matrix. The scalar matrix cannot be a unit matrix, while a unit matrix can be a scalar matrix. For example:

Matrix

Unit Matrix: A scalar matrix whose principal diagonal elements are one and all non-diagonal elements are zero is called the unit matrix. It is also called an identity matrix. It is denoted by the letter I. It is also a scalar matrix.

Matrix

For example:

Matrix

Triangular Matrix: It is a special kind of square matrix that forms a triangle either upper or lower to its principal diagonal. There are two types of the triangular matrix:

  • Upper Triangular Matrix: A square matrix in which all the elements below the leading diagonal are zero. In other words, a square matrix A=[aij] is upper triangular if it satisfies the following condition:
aij=0 for i<j

For example:

Matrix
  • Lower Triangular Matrix: A square matrix in which all the elements above the principal diagonal are zero. In other words, a square matrix A=[aij] is a lower triangular if it satisfies the following condition:
aij=0 for<ij

For example:

Matrix

Submatrix: A submatrix of a matrix is determined by deleting any rows or columns or both. For example, consider the following matrix:

Matrix

From the above matrix A, we can generate a submatrix. We are deleting the 2nd row and 3rd column. After deleting, we get the following submatrix:

Matrix

Applications of Matrices

  • Graph Theory: The adjacency matrix of a finite graph is a basic notation of graph theory.
  • Computer Graphics: In computer graphics, matrices play a vital role in the projection of a three-dimensional image in the 2D screen. Graphics software uses matrix mathematics to process linear transformation to render the image.
  • Solving Linear Equations: Using row reduction, Cramer's rule (Determinants), using the inverse matrix.
  • Robotics: In robotics and automation, matrices are the base elements of the robot movements.
  • Recording Experiments: It is used in many organizations to record the data for their experiments.
  • Geology: It is used for seismic surveys.
  • Cryptography.

Operations on Matrix

We can perform the following operations on the matrix:

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Scalar Multiplication
  • Inverse
  • Transpose
  • Negative of a Matrix

Addition of Matrices

The sum om of two matrices can be done by adding the elements matching with the positions. Remember that both matrices must be of the same size. The resultant matrix is also of the same size.

(A+B)ij = Aij + Bij

Suppose, there are two matrices A and B, each of size 3×3.

Matrix

The sum of A + B will be:

Matrix

Properties of Addition

  • Commutative Law: A + B = B + A
  • Associative Law: A + (B + C) = (A + B) + C
  • Additive Identity: A + 0 = 0 + A = A
  • Additive Inverse: A + (-A) = (-A) + A = 0

Example: Add the following matrices A and B.

Matrix

Subtraction of Matrices

The subtraction of two matrices can be done by subtracting the elements matching with the positions. In other words, it is an addition of a negative matrix. Remember that both matrices must be of the same size. The resultant matrix is also of the same size.

(A-B)ij = Aij - Bij

Suppose there are two matrices A and B, each of size 3×3.

Matrix

The subtraction of A - B will be:

Matrix

Example: Subtract the following matrices A and B.

Matrix

Multiplication of Matrices

Matrix multiplication is the dot product of the rows and columns. The dot product is the sum of the products of the matching entries of the two sequences of the numbers.

First matrix's number of columns = Second matrix's number of rows

Properties of Multiplication

  • Non-commutative: AB ≠ BA
  • Associative: A(BC) = (AB)C
  • Left Distributive: A(B + C) = AB + AC
  • Right Distributive: (A + B)C = AC + BC
  • Scalar: k(AB)=(kA)B (where k is scalar)
  • Identity: IA=AI=A
  • Transpose: (AB)T=ATBT

Example : Multiply the following matrices.

Matrix

Division of Matrices

The division of the matrices is a tricky process. To divide the two matrices, we perform the following steps:

  • Find the inverse of the divisor
  • Multiply the dividend matrix by the inverse matrix.

Suppose A and B are two matrices, then:

Matrix

Where B-1 represents the inverse of B.

Example: Divide the following matrices A and B.

Matrix

Solution:

A is the numerator, and B is the denominator.

First, we will find the inverse of B.

Matrix

Now multiply the dividend matrix by the inverse.

Matrix

Scalar Multiplication

When a matrix is multiplied by a scalar (constant) is called scalar multiplication. In the scalar multiplication, we multiply each element of the matrix by the scalar.

Suppose a matrix A of size 3×3 is given.

Matrix

It is multiplied by a constant k then the scalar multiplication k × A will be:

Matrix

Properties of Scalar Multiplication

Let, A and B two matrices of size m × n, and a and b are two scalars. Then:

  • Associative Property: a (b A) = (a b) A
  • Commutative Property: aA = Aa
  • Distributive Property: (a + b) A = aA + b A and a (A + B) = aA + a B
  • Identity Property: 1 A = A
  • Multiplicative Property: O A = O (where O is a zero matrix)
Matrix

The inverse of a Matrix

Suppose that we have a square matrix A, whose determinant is not equal to zero, then there exists an m×n matrix A-1 that is called the inverse of A such that: AA-1 = A-1A = I, where I is the identity matrix.

It is easy to find the inverse of a 2×2 matrix in comparison to 3×3 or 4×4 matrix. Follow the steps to find the inverse of a 2×2 matrix.

  • Swap the positions of the elements a and d.
  • Put a negative sign in front of the b and c
  • Divide each element of the matrix by the determinant.

For example, A is a 2×2 matrix.

Matrix

Its determinant is (ad-bc) that is not equal to zero, then the inverse of the matrix will be:

Matrix

There are three methods to find the inverse of the large matrix.

  • Gauss-Jordan Method
  • Using Adjugate
  • Use a matrix calculator

Properties of Inverse Matrix

  • A × A-1= I
  • A-1 × A = I
  • (A-1)-1 = A
  • (A-1)T = (AT)-1

Transpose Matrix

When we convert the rows into columns and columns into rows and generates a new matrix with this conversion is called the transpose matrix. It is denoted by AT or A′, or Atr, or At. For example, consider the following matrix:

Matrix

The transpose of the above matrix is:

Matrix

Properties of Transpose Matrix

Let, A and B are two matrices and k is a real number, then:

  • (AT)T = A
  • (A + B)T = AT + BT
  • (AB)T = BTAT
  • (kA)T = kAT
Matrix

Negative of a Matrix

Let, A=aij be a m×n matrix. The negative of the matrix A is the m×n matrix B=bij such that bij=-aij for all i, j. The negative of the matrix A is written as -A.

Matrix




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA