MathCalcs

Square Matrix

Square matrix is a matrix whose number of columns is equal to the number of rows. So, if a matrix has 5 rows and 5 columns, its a square matrix.

Example of a Square Matrix


Square Matrix of Size 2x2

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

The matrix L is a square matrix with 2 rows & columns.

It is a special square matrix called Identity Matrix.


Square Matrix of Size 3x3

\(L = \begin{bmatrix} 3 & 2 & 3 \\ 8 & 3 & 6 \\ 7 & 6 & 3 \end{bmatrix} \)

The matrix L is a square matrix with 3 rows and columns.


Square Matrix of Size 4x4

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

The above matrix L is a square matrix of size 4x4 because it has 4 rows and 4 columns.


Properties of Square Matrix

Below are some distinct properties of a square matrix:

1. Eigen Value and Eigen Vectors

Eigen values and Eigen vectors are mostly used in linear algebra. So its important to understand what they actually are.

Eigen Value

Eigen value is a scalar value that satisfies the equation Ax = λx

where,


Eigen Vector

Eigen vectors are the non-zero vectors, which are only scaled by a scalar value when multiplied by a square matrix.

For example, Suppose we have a matrix A and a vector V (non-zero).

\(A \mathbf{v} = \lambda \mathbf{v} \)

Here, λ is the eigen value and v is the eigen vector.



Meaning of Eigen Value and Eigen Vector

The above equation means that:

Multiply a non-zero vector with a matrix A = Multiply the same vector with a scalar value λ



Note: Only the square matrices have eigen values and eigen vectors.

2. Determinant

Determinant of a matrix is a scalar value that tells how linear transformation changes the area or volume of a shape.

Suppose the matrix M is a square matrix of size n x n.

The determinant of matrix M is denoted by |M| or det(M).


Determinant = 1

If determinant of a square matrix is 1, it means the matrix when applied to a shape, doesn't change the area or volume of the shape.


Determinant = 0

If determinant of a square matrix is 0, it means the matrix when applied to a shape, the shape reduces to a line or a point (zero volume).


To calculate the determinant of

\(A = \begin{bmatrix} p1 & p2 \\ p3 & p4 \end{bmatrix} \)
\( \text{det}(A) = p1 \cdot p4 - p2 \cdot p3 \)
\(A = \begin{bmatrix} p1 & p2 & p3 \\ p4 & p5 & p6 \\ p7 & p8 & p9 \end{bmatrix} \)
\(\text{det}(A) = p1 \cdot (p5 \cdot p9 - p6 \cdot p8) - p2 \cdot (p4 \cdot p9 - p6 \cdot p7) + p3 \cdot (p4 \cdot p8 - p5 \cdot p7) \)

The complexity of calculating it increases with the size. Use this matrix determinant calculator


3. Inverse

Inverse of a matrix is a matrix, that undoes the linear transformation of the original matrix.

Only square matrices are invertible. Not even all square matrices are invertible.

Its determinant cannot be zero for matrix to be invertible.

Because if determinant is zero, after linear transformation it loses its volume and hence cannot be reversed.

Calculate the inverse of a matrix using this matrix inverse calculator


4. Trace

Trace is a scalar value that is equal to sum of all diagonal elememnts of a square matrix.

Non-square matrices do not have trace, because they don't have diagonal elements.

Trace of a matrix is denoted by tr(M).

\(M = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \)
\( \text{tr}(M) = 1 + 5 + 9 = 15 \)

Special Types of Square Matrix

Diagonal Matrix

Matrix with all elements outside the main diagonal are zero.

\(M = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} \)

Identity Matrix

Matrix with all diagonal elements as 1 and all other elements as 0.

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

Symmetric Matrix

A square matrix is a symmetric matrix if its transpose is equal to itself.

\(M = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 5 \\ 3 & 5 & 6 \end{bmatrix} \)
\(M^T = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 5 \\ 3 & 5 & 6 \end{bmatrix} \)

FAQs

Is squaring a matrix same as square matrix?

No, Squaring matrix means multiplying a matrix with itself, where as square matrix is a matrix with same number of rows and columns

Can you find a determinant of a non-square matrix?

No, Determinant can only be found for square matrices.

Can a square matrix with two identical columns be invertible?

No, a square matrix with two identical columns cannot be invertible because it will have determinant zero.

Why a matrix with determinant zero is not invertible?

A matrix with its determinant being zero, loses the volume of the shape after linear transformation. And since, inverse is a matrix that undoes linear transformation, it cannot be reversed.

Math Calcs

A playground of Linear Algebra Resources and Tutorials

©2024. All Rights Reserved