# Learn Linear Algebra for Data Science (Mini-Course)

August 12, 2020 2020-08-13 15:39## Learn Linear Algebra for Data Science (Mini-Course)

### Matrix Transpose, Determinants and Inverse

In this lesson we will learn about some matrix transformation techniques such as the matrix transpose, determinants and the inverse.

#### Matrix Transpose

The transpose of a matrix is used to produce a matrix whose row and column indices have been swapped, i.e., the element of the matrix is swapped with the element of the matrix. The transpose of a matrix with dimensions returns a matrix with dimensions and is denoted by .

For example, consider a matrix . We can find its transpose by swapping the column and row elements as follows.

Also note that for a square matrix, i.e., a matrix with an equal number of rows and columns, the diagonal elements remain unchanged for the original matrix and its transpose.

#### Determinant of a matrix

The determinant of a matrix can be computed only if the matrix is a square matrix. For a matrix , the determinant is denoted as .

The formula for calculating the determinant of a matrix depends upon the dimension of the matrix.

For a first order matrix, i.e., 1 1 matrix, , the determinant is the element itself and is given as,

For a 2 2 matrix , the determinant is given as,

For a higher order matrix such as 3 3 matrix , the determinant is given as,

The determinant of a matrix is used in finding the inverse of the matrix, which we will discuss in the next section.

#### Inverse of a Matrix

The inverse of a matrix is denoted as and is given by a matrix such that the equation is satisfied. Here , also denoted by is known as the identity matrix; a matrix whose entries are zero, with the exception of the diagonal entries which are populated by ones.

For example, is an Identity matrix of dimension 2.

For an arbitrary matrix , the inverse can be calculated from the equation,

where is known as the determinant of . *Also note that a matrix is invertible if and only if the determinant of the matrix is non-zero., i.e., .*

For example, suppose a matrix . Its inverse can be obtained as,

Hence, the inverse of the matrix is .

Now, let us check if this works with the definition we gave for the inverse of a matrix that it satisfies the equation .

We can compute the value of L.H.S of the equation as,

Thus, the L.H.S of the equation is identical to the R.H.S and the equation is satisfied.

In this lesson, we discussed some of the essential processes such as finding the transpose, determinant, and inverse of a matrix. With this, we have developed an understanding of some of the important concepts in Linear Algebra. Head on to the next lesson to attempt some practice questions to evaluate your learning so far.