Matrix is a collection of values ordered in rows and columns to represent data and perform operations on them. Matrix is a principal concept in linear algebra and is widely used in different fields like Physics, Computer Science, and Engineering.

Matrix is represented by a Capital Letter and the elements inside matrix are represented by small letters. For example L is a matrix and l11, l12 are elements of the matrix L.

```
\(L = \begin{bmatrix}
l_{11} & l_{12} \\
l_{21} & l_{22}
\end{bmatrix}
\)
```

Matrix is a array of values arranged in rows and columns. The values in matrix can be numbers, symbols, or expressions. The values are called elements of the matrix.

Order of matrix is the number of rows and columns in the matrix. The order is represented by rows first and then columns. For example rows x columns. It is also called the size of matrix or dimension of matrix.

```
\(
L = \begin{bmatrix}
l_{11} & l_{12} \\
l_{21} & l_{22}
\end{bmatrix}
\)
```

In aboves example the dimension of matrix L is 2x2.

Suppose, Matrix K has j rows and k columns, then the dimension of matrix K is **j x k**

Dimension of matrix is important because it helps in determining the number of elements in the matrix. So, if the size or dimension of matrix is 2 rows and 3 columns, then the matrix will have 2 times 3 = 6 elements.

Matrix dimensions is not limited to number elements, It server much greater purpose than that.

Dimensions helps in determining the number of elements in the matrix, it also helps in determining the operations that can be performed on the matrix.

For operations like addition and subtraction between two matrices, the order of the matrices should be same. However, for multiplication of matrices, the rule is different.

Matrix multiplication between two matrices requires the number of columns in the first matrix to be equal to number of rows in the second matrix. If this condition is not met, the matrices cannot be multiplied.

There are differnent types of matrices. These types are differentiated based on the properties, dimensions and elements of the matrix.

A Matrix is called a row matrix, if it has only one row and multiple columns. For example, [41, 44, 12] is a row matrix.

Row matrix is also called a row vector, as it has only one row.

A Matrix with one column and multiple rows is called a column matrix. For example the matrix G is a column matrix.

```
\(
G = \begin{bmatrix}
41 \\
44 \\
12
\end{bmatrix}
\)
```

Column matrix is also called a column vector, as it has only one column.

A matrix with same number of rows and columns is called a square matrix. Example of square matrix is

```
\(
G = \begin{bmatrix}
41 & 44 \\
12 & 14
\end{bmatrix}
\)
```

Any matrix with size n x n is called square matrix.

A matrix is called a Diagonal Matrix if all the elements outside of the main diagonal are zero. For example

```
\(
G = \begin{bmatrix}
41 & 0 \\
0 & 14
\end{bmatrix}
\)
```

Another example of (3x3) Diagonal Matrix is

```
\(
G = \begin{bmatrix}
41 & 0 & 0 \\
0 & 14 & 0 \\
0 & 0 & 12
\end{bmatrix}
\)
```

As you can see, only the elements on the main diagonal are non zero

A scalar matrix is a special type of diagonal matrix where all the elements on the main diagonal are equal. For example

```
\(
G = \begin{bmatrix}
5 & 0 & 0 \\
0 & 5 & 0 \\
0 & 0 & 5
\end{bmatrix}
\)
```

The matrix above is a 3x3 scalar matrix with elements g11 = g22 = g33 = 5. and all other elements = 0

A identity matrix is a special type of diagonal matrix where all elements on the main diagonal are 1 and other elements are 0. For example

```
\(
G = \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
\)
```

The matrix above is a 3x3 identity matrix, with elements g11 = g22 = g33 = 1 and all other elements = 0

A matrix is called a zero matrix if all the elements in the matrix are zero. For example

```
\(Z = \begin{bmatrix}
0 & 0 & 0 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{bmatrix}
\)
```

The matrix above is a 3x3 zero matrix with all elements = 0

A triangular matrix is a matrix where all the elements above or below the main diagonal are zero. For example

```
\(
G = \begin{bmatrix}
1 & 2 & 3 \\
0 & 4 & 5 \\
0 & 0 & 6
\end{bmatrix}
\)
```

In above 3x3 matrix, all the elements above the main diagonal are zero. The matrix is called a upper triangular matrix, as all the elements below the main diagonal are non zero.

Another example of 3x3 triangular matrix is

```
\(
G = \begin{bmatrix}
1 & 0 & 0 \\
4 & 5 & 0 \\
7 & 8 & 9
\end{bmatrix}
\)
```

This is a lower triangular matrix, as all the elements above the main diagonal are zero.

Symmetric matrix is a special matrix that is equal to its transpose matrix. For example

```
\(
G = \begin{bmatrix}
1 & 2 & 3 \\
2 & 4 & 5 \\
3 & 5 & 6
\end{bmatrix}
\)
```

You can see that in symmetric matrix, g12 = g21, g13 = g31 and g23 = g32. This is the property of symmetric matrix.

Skew symmetric matrix is a special symmetric matrix where the transpose of the matrix is equal to the negative of the matrix. For example

```
\(
G = \begin{bmatrix}
0 & 2 & -3 \\
-2 & 0 & 5 \\
3 & -5 & 0
\end{bmatrix}
\)
```

Its transpose is

```
\(
G^T = \begin{bmatrix}
0 & -2 & 3 \\
2 & 0 & -5 \\
-3 & 5 & 0
\end{bmatrix}
\)
```

You can clearly notice that G = -G^T. This is the property of skew symmetric matrix.

A matrix is a orthogonal matrix if its transpose is equal to its inverse. For example

```
\(
G = \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
\)
```

The inverse of matrix G is

```
\(
G^{-1} = \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
\)
```

And the transpose of matrix G is

```
\(
G^T = \begin{bmatrix}
1 & 0 \\
0 & -1
\end{bmatrix}
\)
```

As you can see G^-1 = G^T. These types of matrices are called orthogonal matrices.

The determinant of orthogonal matrix is either 1 or -1.

A matrix is called a singular matrix if its determinant is zero.

```
\(
G = \begin{bmatrix}
1 & 2 \\
2 & 4
\end{bmatrix}
\)
```

The determinant of matrix G is given by

```
\(
\text{det}(G) = 1 \times 4 - 2 \times 2 = 0
\)
```

Hence, the matrix G is a singular matrix.

Any matrix with non-zero determinant is called a non-singular matrix. For example

```
\(
G = \begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}
\)
```

The determinant of matrix G is given by

```
\(
\text{det}(G) = 1 \times 4 - 2 \times 3 = 4 - 6 = -2
\)
```

Here, determinant of G is -2, so the matrix G is a non-singular matrix.

Non singular matrices are also called invertible matrices, as they have an inverse.

A matrix only has inverse if its determinant is not a zero.

A matrix is a idempotent matrix, if it is multiplied by itself and the result is the same matrix. For example

```
\(
G = \begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}
\)
```

If you multiply matrix G by itself, you will get the same matrix G.

```
\(
G \cdot G = \begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}
\)
```

G = G * G = G^2. This is the property of idempotent matrix.

A matrix is called a nilpotent matrix if it is a square matrix and when raised to a power n (n is greater equal to order of matrix), the result is a zero matrix. For example

For A (with order 2 x 2) to be a nilpotent matrix, A^2 should be a zero matrix.

For matrix K (with order 3 x 3) to be a nilpotent matrix, K^3 should be a zero matrix.

```
\(
K = \begin{bmatrix}
4 & -4 \\
4 & -4
\end{bmatrix}
\)
```

K has order 2 x 2, so K^2 is

```
\(
K^2 = \begin{bmatrix}
4 & -4 \\
4 & -4
\end{bmatrix} \cdot \begin{bmatrix}
4 & -4 \\
4 & -4
\end{bmatrix} = \begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}
\)
```

So, K is a nilpotent matrix.

A matrix is called a Toeplitz matrix if all the elements in the diagonal are same. For example

```
\(
G = \begin{bmatrix}
1 & 2 & 3 \\
4 & 1 & 2 \\
5 & 4 & 1
\end{bmatrix}
\)
```

G is a 3 x 3 Toeplitz matrix, as all the elements in the diagonal are same.

Its similar to Toeplitz matrix, but the elements in the anti-diagonal are same. For example

```
\(
G = \begin{bmatrix}
1 & 2 & 3 \\
2 & 3 & 1 \\
3 & 1 & 2
\end{bmatrix}
\)
```

G is a 3 x 3 Hankel matrix, as all the elements in the anti-diagonal are same.

There are many other types of matrices like Circulant Matrix, Vandermonde Matrix, Stochastic Matrix, etc.

A submatrix is a matrix that is created from original matrix by removing some rows and columns. For example, if you have a matrix G

```
\(
G = \begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{bmatrix}
\)
```

If you remove the first row and first column, you will get a submatrix of G

```
\(
G1 = \begin{bmatrix}
5 & 6 \\
8 & 9
\end{bmatrix}
\)
```

So, G1 is a submatrix of G.

There are many operations that can be performed on matrices. Some of the basic operations are

- Matrix Addition
- Matrix Subtraction
- Matrix Multiplication
- Matrix Transpose
- Matrix Inverse
- Matrix Determinant
- Matrix Rank
- Matrix Trace
- Checkout All Matrix Calculators

These are some of the basic operations that can be performed on matrices. Each operation has its own significance and use cases.

Matrices are used to represent linear equations in simple form. For example, consider the following equations

```
\(
\begin{align*}
2x + 3y &= 5 \\
4x + 5y &= 6
\end{align*}
\)
```

The above equations can be represented in the form of a matrix

```
\(
\begin{bmatrix}
2 & 3 \\
4 & 5
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
=
\begin{bmatrix}
5 \\
6
\end{bmatrix}
\)
```

By solving the above matrix by taking the inverse of the matrix on the left side and multiplying it with the right side matrix, you can find the values of x and y.

```
\(\begin{bmatrix}
x \\
y
\end{bmatrix}
=
\begin{bmatrix}
5 \\
6
\end{bmatrix}
\begin{bmatrix}
2 & 3 \\
4 & 5
\end{bmatrix}^{-1}
\)
```

Linear Transformation is process of shifting, rotating, scaling, shrinking, the shapes in a 2D or 3D space.

Matrices are used to represent linear transformations in a simple form. For example, consider the following matrix

```
\(
G = \begin{bmatrix}
2 & 4 \\
3 & 5
\end{bmatrix}
\)
```

If you multiply the matrix G with a vector [1, 2], you will get a new vector [10, 11]

```
\(
G \begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 2 \times 1 + 4 \times 2 \\ 3 \times 1 + 5 \times 2 \end{bmatrix} = \begin{bmatrix} 10 \\ 11 \end{bmatrix}
\)
```

This is a simple example of linear transformation.

©2024. All Rights Reserved