Square Matrix Calculator (2x2 to 6x6)

Enter Matrix:
Matrix Visualization

Square Matrix Operations

What is a Square Matrix?

A square matrix is a matrix with an equal number of rows and columns. These matrices have special properties and are crucial in many mathematical and practical applications.

Key Operations on Square Matrices

1. Determinant

The determinant is a scalar value that can be computed from the elements of a square matrix. It has many important applications in linear algebra.

Formula: For a 2x2 matrix \(A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\), the determinant is:

\[\det(A) = ad - bc\]

2. Inverse

The inverse of a square matrix A, denoted A^(-1), is a matrix that when multiplied with A gives the identity matrix.

Formula: For a 2x2 matrix, if \(\det(A) \neq 0\), the inverse is:

\[A^{-1} = \frac{1}{\det(A)} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}\]

3. Eigenvalues

Eigenvalues are special scalars associated with a square matrix. They are solutions to the characteristic equation.

Formula: For a matrix A, eigenvalues λ satisfy:

\[\det(A - \lambda I) = 0\]

4. Trace

The trace of a square matrix is the sum of the elements on its main diagonal (from top left to bottom right).

Formula: For an n×n matrix A:

\[tr(A) = \sum_{i=1}^n a_{ii}\]

Example Calculation

Let's calculate the trace for the matrix:

\[A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\]

Steps:

  1. Identify the diagonal elements: 1 and 4
  2. Sum these elements: 1 + 4 = 5

Result: The trace of A is 5.

Visual Representation

1 2 3 4

This diagram highlights the diagonal elements (in blue) used in calculating the trace.