In this final and 4th Part of our brief look into Linear Algebra, we’ll talk about the Transpose and Inverse of matrices.


Matrix Transpose

In other words, $$ A_{ij} = (A^T)_{ji} $$

Think of it like rotating the matrix 90° in clockwise direction and then flipping it.

For example, $$ A = \begin{bmatrix} 2&3&2&5 \\ 1&3&4&5 \end{bmatrix} $$ $$ A^T = \begin{bmatrix} 2&1 \\ 3&3 \\ 2&4 \\ 5&5 \end{bmatrix} $$


Matrix Inverse

A square (matrix A) is invertible if there exist a (matrix B) such that (AB = I) and (BA = I)

The inverse of a matrix is denoted by (A^{-1})

For example, given (A = \begin{bmatrix} 2&7 \\ 1&4 \end{bmatrix} ) and (B = \begin{bmatrix} 4&-7 \\ -1&2 \end{bmatrix} )

We have (A*B) = ( \begin{bmatrix} 2&7 \\ 1&4 \end{bmatrix} \begin{bmatrix} 4&-7 \\ -1&2 \end{bmatrix}
= \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} = I )

The existence of (B) makes (A) invertible. Same can also be said vice versa.

Note, however, that a non-square matrix does not have an inverse matrix.


With these, we’ve learnt the basics of the arithmetic of tensors.

We’ll dive straight into TensorFlow in the next tutorial.