Linear Algebra formula reference

Matrix Trace

Adds the entries on the main diagonal of a square matrix.

Open in editor
LaTeX\operatorname{tr}(A)=\sum_{i=1}^{n}a_{ii}

Variables

  • A: n × n square matrix
  • aᵢᵢ: diagonal entries
  • tr(A): trace of A

How to use this formula

Adds the entries on the main diagonal of a square matrix.

Important notes

  • Trace is defined for square matrices.
  • The trace is invariant under similarity transformations.

Quick example

For diag(2, 3, 5), tr(A) = 10.

Applicability, worked calculation, and verification

Assumptions and domain checks

  • Trace is defined for square matrices.
  • For the Matrix Trace, the index variable, lower bound, upper bound, and any empty-sum or empty-product convention must be clear.
  • Matrix and vector dimensions must be compatible, and any required inverse, determinant, rank, or basis condition must hold.

Worked example

Input

Output

For diag(2, 3, 5), tr(A) = 10.

Common mistakes

  • Do not omit the index or bounds in Matrix Trace; changing either one changes which terms are included.
  • Do not assume commutativity, invertibility, independence, or full rank unless the required condition has been established.

Continue the workflow

Use Matrix Trace in your own work

  1. Check the domainMatch the variables and assumptions to the problem before substituting values.
  2. Copy the exact notationPreserve grouping, signs, and exponents in \operatorname{tr}(A)=\sum_{i=1}^{n}a_{ii}.
  3. Edit or convertOpen the expression in the LaTeX editor, then export it for your document or web page.

Review and verification

Last reviewed: 2026-07-23

Automated quality check: Kept noindex until the missing evidence is supplied.

Formula references

Frequently asked questions

What is the Matrix Trace used for?

Adds the entries on the main diagonal of a square matrix.

Can I copy this formula as LaTeX?

Yes. Copy \operatorname{tr}(A)=\sum_{i=1}^{n}a_{ii} or open it in the LaTeX editor.

What should I check before using it?

Confirm that each variable, unit, domain restriction, and assumption matches the problem.

Reuse, attribution, and correction

Share this reference without losing its source

Copy a citation, permanent link, Markdown link, or self-contained embed card. Each reusable format points readers back to the maintained canonical page.

Report an issue

Search the whole reference

Symbols, formulas, guides, tools and commands

Start typing to search.

move · Enter open · Esc close