🔺 Matrix Trace Calculator

Find the trace of a square matrix

How to Use This Calculator

1

Select Matrix Size

Choose the size of your square matrix (2×2, 3×3, or 4×4).

2

Enter Matrix Elements

Input all elements of your square matrix (diagonal elements highlighted).

3

Calculate

Click to compute the trace (sum of diagonal elements).

4

Get Result

View the trace value (sum of diagonal elements).

Formula

tr(A) = a₁₁ + a₂₂ + ... + aₙₙ = Σᵢ₌₁ⁿ aᵢᵢ

Sum of diagonal elements

Definition:

The trace of a square matrix A is the sum of its diagonal elements: tr(A) = a₁₁ + a₂₂ + ... + aₙₙ

Example:

For A = [[a b], [c d]], tr(A) = a + d

Properties:

  • tr(A + B) = tr(A) + tr(B)
  • tr(cA) = c·tr(A) for scalar c
  • tr(Aᵀ) = tr(A)
  • tr(AB) = tr(BA)
  • tr(A) = sum of eigenvalues of A

About Matrix Trace Calculator

The Matrix Trace Calculator computes the trace of a square matrix, which is the sum of its diagonal elements. The trace is a fundamental matrix invariant with important connections to eigenvalues, determinant, and linear transformations.

When to Use This Calculator

  • Eigenvalues: Sum of eigenvalues equals trace
  • Characteristic Polynomial: Coefficient relationships
  • Similarity: Trace is invariant under similarity transformations
  • Physics: Quantum mechanics, statistical mechanics
  • Control Theory: System analysis

Why Use Our Calculator?

  • Simple Operation: Sum of diagonal elements
  • Visual Highlight: Shows diagonal elements
  • Quick Result: Instant calculation
  • Educational: Helps understand trace
  • Accurate: Precise calculations
  • Free: No registration required

Key Concepts

  • Diagonal Sum: Simple sum of diagonal elements
  • Invariant: Trace doesn't change under similarity
  • Eigenvalue Sum: tr(A) = sum of all eigenvalues
  • Trace Formula: Important for characteristic polynomial
  • Cyclic Property: tr(ABC) = tr(CAB) = tr(BCA)

Frequently Asked Questions

Can I compute trace for non-square matrices?

No, trace is only defined for square matrices (same number of rows and columns). For rectangular matrices, no diagonal exists in the usual sense.

Is trace related to eigenvalues?

Yes! For any square matrix A, tr(A) equals the sum of all eigenvalues (counting multiplicities): tr(A) = λ₁ + λ₂ + ... + λₙ.

Does trace equal determinant?

Only for 1×1 matrices! In general, trace and determinant are different. For 2×2 matrix [[a b], [c d]], tr = a+d while det = ad-bc.

Is tr(AB) equal to tr(A)tr(B)?

No! This is generally false. The correct property is tr(AB) = tr(BA), which works for any matrices where both products are defined.

Why is trace important in linear algebra?

Trace is a fundamental invariant that's preserved under similarity transformations. It appears in characteristic polynomials, eigenvalue calculations, and many applications in physics and engineering.