\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
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
- Check the domainMatch the variables and assumptions to the problem before substituting values.
- Copy the exact notationPreserve grouping, signs, and exponents in
\operatorname{tr}(A)=\sum_{i=1}^{n}a_{ii}. - 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
- Digital Library of Mathematical FunctionsNational Institute of Standards and Technology — Definitions, notation, identities, and reference material for mathematical functions.
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.