Trace is the operation that extracts the additive diagonal content of a linear transformation. For a matrix it is the sum of diagonal entries, but the real point is basis-independence: trace is attached to the [linear map](/page/Linear%20Map), not to a particular coordinate display. This makes it a bridge between [matrix](/page/Matrix) computations, [eigenvalue and eigenvector](/page/Eigenvalue%20and%20Eigenvector) information, [module](/page/Module) theory, and [field extension](/page/Field%20Extension) arithmetic.
text
admin
In linear algebra, trace records the first-order effect of an endomorphism on volume through determinants such as $\det(I+tA)$: for an $n \times n$ matrix $A$ over a field,
text
admin
\begin{align*}
\det(I+tA)=1+t\operatorname{tr}(A)+\text{terms of degree at least }2\text{ in }t
\end{align*}
align*
admin
as a polynomial identity. In representation theory, characters are traces of representing matrices. In algebraic number theory, the field trace turns multiplication by an element into a scalar in the base field, producing trace forms, discriminants, and dual bases. The same word is used because all of these constructions reduce an endomorphism to a scalar in a way compatible with change of basis and cyclic composition.
text
admin
## Definition
h2
admin
### Linear and Matrix Trace
h3
admin
A linear transformation may be written by many different matrices, so the central object is not the array of entries but the scalar that survives every change of basis. The trace is first of all this coordinate-independent scalar attached to an endomorphism; the familiar diagonal sum is the computational formula used after a basis has been chosen.
text
admin
[definition: Trace of a Linear Endomorphism]
Let $k$ be a field and let $V$ be a finite-dimensional $k$-[vector space](/page/Vector%20Space) with $\dim_k V=n$. The trace of a linear endomorphism is the map
\begin{align*}
\operatorname{tr}: \operatorname{End}_k(V) \to k.
\end{align*}
It sends $T$ to the scalar
\begin{align*}
\sum_{i=1}^n A_{ii},
\end{align*}
where $A \in k^{n \times n}$ is the matrix of $T$ with respect to any basis of $V$.
[/definition]
definition
admin
To prove and reuse this invariant, we need a separate name for the raw diagonal-sum operation on a square matrix. This matrix-level definition is the computational object whose behaviour under similarity makes the operator-level definition well-defined.
text
admin
[definition: Matrix Trace]
Let $R$ be a commutative ring and let $n \in \mathbb{N}$. The matrix trace is the map
\begin{align*}
\operatorname{tr}: R^{n \times n} \to R.
\end{align*}
It sends $A$ to
\begin{align*}
\sum_{i=1}^n A_{ii}.
\end{align*}
[/definition]
definition
admin
A first computation shows how little of a displayed matrix trace actually uses. Only diagonal entries enter the scalar, even though off-diagonal entries can still affect eigenvectors and the geometry of the map.
text
admin
[example: Trace of a Matrix]
Let $A \in \mathbb{R}^{3 \times 3}$ have diagonal entries $A_{11}=2$, $A_{22}=3$, and $A_{33}=-6$. By the definition of matrix trace,
\begin{align*}
\operatorname{tr}(A)=A_{11}+A_{22}+A_{33}=2+3+(-6)=-1.
\end{align*}
Changing only an off-diagonal entry, such as replacing $A_{12}$ by $100$, does not change this trace value. The trace is therefore not the sum of all matrix entries; it is the diagonal sum.
[/example]
example
admin
A coordinate formula only becomes an invariant if it survives change of coordinates. A linear map can be represented by many similar matrices, so the diagonal sum would be useless as an operator invariant if similar matrices could have different traces.
text
admin
The next result supplies the missing invariance test. It isolates the basis-change operation as matrix conjugation and shows that trace is unchanged under that operation, so trace can be used as a scalar attached to the underlying linear map rather than to a chosen matrix.
text
admin
[quotetheorem:7811]
text
admin
This invariance theorem is the reason the diagonal formula can be promoted from a matrix recipe to a definition for linear maps. Once similar matrices have the same trace, choosing a different basis changes the representing matrix but not the scalar being measured. It also explains why characters in representation theory are constant on conjugacy classes: conjugating the representing matrix leaves its trace unchanged.
text
admin
The result has a precise limitation. It says trace is unchanged under similarity, not that trace determines the similarity class. Many non-similar matrices can have the same trace, so trace is a coarse invariant rather than a complete classifier. Its usefulness comes from being easy to compute, stable under basis change, and compatible with the algebraic operations developed below.
text
admin
### Module and Field Trace
h3
admin
Algebra often asks the same linear questions over rings rather than fields. For a finite free module, an endomorphism still has a matrix after a basis is chosen, but the resulting scalar must not depend on which basis was used. Similarity-invariance of matrix trace makes it possible to define trace directly for such module endomorphisms.
text
admin
[definition: Trace of an Endomorphism of a Finite Free Module]
Let $R$ be a commutative ring and let $M$ be a finite free $R$-module. The trace of an endomorphism of $M$ is the map
\begin{align*}
\operatorname{tr}: \operatorname{End}_R(M) \to R.
\end{align*}
It sends $T$ to
\begin{align*}
\operatorname{tr}(A),
\end{align*}
where $A$ is the matrix of $T$ with respect to any $R$-basis of $M$.
[/definition]