1. Home
  2. Explore
  3. Mathematics
  4. Visualizing Matrix Trace

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Visualizing Matrix Trace

Trace as Divergence: A Geometric Interpretation

1. Matrices as Vector Fields

For a matrix AAA, each position vector xxx is assigned a new vector AxAxAx. This creates a vector field:

x \longmapsto Ax

At every point in the plane, the vector field attaches the vector AxAxAx to the point whose position vector is xxx.

In visual diagrams, vector lengths are often standardized so that the directions remain visible. If the actual lengths are important, color or another visual scale can indicate their magnitudes.

The columns of a matrix

For a 2×22 \times 22×2 matrix

A = \begin{pmatrix} a & b c & d \end{pmatrix},

the vectors attached to the standard basis points are:

  • At (1,0)(1,0)(1,0):

A \begin{pmatrix} 1 0 \end{pmatrix}

\begin{pmatrix} a c \end{pmatrix},

which is the first column of AAA.

  • At (0,1)(0,1)(0,1):

A \begin{pmatrix} 0 1 \end{pmatrix}

\begin{pmatrix} b d \end{pmatrix},

which is the second column of AAA.

Thus, the columns of a matrix describe the vectors attached to the standard basis directions.

A matrix can be visualized as a vector field that assigns the vector AxAxAx to every point xxx.


2. Divergence and Local Area Change

The central geometric interpretation is:

The trace of a matrix is the divergence of the vector field generated by that matrix.

What divergence measures

Divergence measures how quickly a small region expands or contracts as its points move according to a vector field.

Consider a very small region surrounding a point. Allow every point in the region to move for a short time. The region may:

  • Expand, indicating positive divergence.

  • Contract, indicating negative divergence.

  • Preserve its area, indicating zero divergence.

The divergence is not simply the total change in area. It is the change in area per unit of initial area, measured in the limit as the region becomes infinitesimally small.

If a region initially has area SSS and its area changes by ΔS\Delta SΔS over a short time Δt\Delta tΔt, then the approximate divergence is

\frac{1}{S}\frac{\Delta S}{\Delta t}.

In the infinitesimal limit, this becomes

\operatorname{divergence}

\frac{1}{S}\frac{dS}{dt}.

Why the change must be measured per area

Suppose one small region experiences an area change of approximately −0.148-0.148−0.148. If the initial area is quadrupled while the shape and vector field remain the same, the total area change becomes approximately

4(-0.148)=-0.592,

which is close to the observed value −0.595-0.595−0.595 after rounding.

The total area change depends on the size of the region, but the area change per unit area remains the same. This is why divergence is a local rate normalized by area.


3. Why the Divergence Is Constant for a Matrix-Generated Field

For a general vector field, divergence can vary from point to point. However, for a vector field generated by a fixed matrix AAA, the divergence is the same everywhere.

Let xxx be a position vector, and let another nearby point be

x+d,

where ddd is a small displacement.

The vectors attached to these points are:

Ax \qquad\text{and}\qquad A(x+d).

Their difference is

A(x+d)-Ax=Ad.

After a short time ε\varepsilonε, the displacement between the two points changes from ddd to approximately

d+\varepsilon Ad.

The important observation is that this expression contains no xxx. It depends only on the displacement ddd, the matrix AAA, and the short time ε\varepsilonε.

Therefore, the same initial shape undergoes the same deformation regardless of where it is placed in the plane. Every translated copy of a small region experiences the same area change. Consequently, the divergence is constant throughout the entire field.

Extending the result to larger regions

Although divergence is defined locally using infinitesimally small regions, the constant-divergence property allows any convenient region to be used.

Suppose a region UUU is divided into small pieces UiU_iUi​, each with area AiA_iAi​. If the divergence is DDD, then after a short time ε\varepsilonε, each small piece has area approximately

A_i(1+\varepsilon D).

Adding all the pieces gives

\sum_i A_i(1+\varepsilon D)

\left(\sum_i A_i\right)(1+\varepsilon D).

Thus, the entire region scales by the same factor:

1+\varepsilon D.

This makes it possible to compute the divergence using a convenient finite region, such as the unit square.


4. Computing Divergence from the Matrix Entries

Consider the matrix

A= \begin{pmatrix} a & b c & d \end{pmatrix}.

Use the unit square determined by the standard basis vectors (1,0)(1,0)(1,0) and (0,1)(0,1)(0,1).

Contribution from the first basis direction

The vector attached to (1,0)(1,0)(1,0) is

\begin{pmatrix} a c \end{pmatrix}.

The vertical component ccc does not change the area of the square: it shears the region without changing its base and height. The horizontal component aaa, however, changes the width of the region.

Therefore, the first basis direction contributes aaa to the rate of area change.

Contribution from the second basis direction

The vector attached to (0,1)(0,1)(0,1) is

\begin{pmatrix} b d \end{pmatrix}.

The horizontal component bbb produces a shear and does not change the area. The vertical component ddd changes the height.

Therefore, the second basis direction contributes ddd to the rate of area change.

Total area-change rate

The total rate of area change is therefore

a+d.

But a+da+da+d is exactly the trace:

\operatorname{tr}(A)=a+d.

Hence,

\boxed{\operatorname{tr}(A)=\text{divergence of the vector field }x\mapsto Ax.}

The trace measures the instantaneous fractional rate at which area changes under the flow generated by a matrix.

Determinant interpretation

The same result can be obtained using determinants.

After a short time ε\varepsilonε:

  • The point (1,0)(1,0)(1,0) moves approximately to

\begin{pmatrix} 1 0 \end{pmatrix} + \varepsilon \begin{pmatrix} a c \end{pmatrix}

\begin{pmatrix} 1+\varepsilon a \varepsilon c \end{pmatrix}.

  • The point (0,1)(0,1)(0,1) moves approximately to

\begin{pmatrix} 0 1 \end{pmatrix} + \varepsilon \begin{pmatrix} b d \end{pmatrix}

\begin{pmatrix} \varepsilon b 1+\varepsilon d \end{pmatrix}.

The new area is the determinant

\det \begin{pmatrix} 1+\varepsilon a & \varepsilon b \varepsilon c & 1+\varepsilon d \end{pmatrix}.

Expanding gives

(1+\varepsilon a)(1+\varepsilon d)-\varepsilon^2bc

1+\varepsilon(a+d)+\varepsilon^2(ad-bc).

The initial area is 111. Therefore, the first-order rate of area change is

a+d=\operatorname{tr}(A),

because the terms involving ε2\varepsilon^2ε2 vanish after dividing by ε\varepsilonε and taking the limit as ε→0\varepsilon\to 0ε→0.


5. Trace as the Sum of Eigenvalues

Suppose xxx is an eigenvector of AAA with eigenvalue λ\lambdaλ:

Ax=\lambda x.

The vector attached to xxx points along the same line as xxx:

  • If λ>0\lambda>0λ>0, it points in the same direction.

  • If λ<0\lambda<0λ<0, it points in the opposite direction.

  • If λ=0\lambda=0λ=0, the attached vector is zero.

Thus, an eigenvector direction remains invariant under the vector field. Points that begin on an eigenvector line remain on that line as they move.

A parallelogram aligned with eigenvectors

Suppose there are two independent eigenvector directions with eigenvalues λ1\lambda_1λ1​ and λ2\lambda_2λ2​. Choose a parallelogram whose sides lie along these two eigenvector lines.

Let the original side lengths be aaa and bbb, and let θ\thetaθ be the angle between the sides. Its initial area is

S_0=ab\sin\theta.

Along the first eigenvector direction, the side length changes at rate λ1a\lambda_1 aλ1​a. After a short time ε\varepsilonε, the new length is approximately

a(1+\varepsilon\lambda_1).

Similarly, along the second eigenvector direction, the new length is

b(1+\varepsilon\lambda_2).

The new area is therefore

S(\varepsilon)

ab(1+\varepsilon\lambda_1)(1+\varepsilon\lambda_2)\sin\theta.

Dividing by the original area gives

\frac{S(\varepsilon)}{S_0}

(1+\varepsilon\lambda_1)(1+\varepsilon\lambda_2).

Expanding:

\frac{S(\varepsilon)-S_0}{\varepsilon S_0}

\lambda_1+\lambda_2+\varepsilon\lambda_1\lambda_2.

Taking the limit as ε→0\varepsilon\to 0ε→0 removes the final term:

\operatorname{divergence}

\lambda_1+\lambda_2.

Since divergence equals trace,

\boxed{\operatorname{tr}(A)=\lambda_1+\lambda_2.}

For an n×nn\times nn×n matrix, the corresponding result is

\boxed{\operatorname{tr}(A)=\sum_{i=1}^n\lambda_i,}

where eigenvalues are counted with algebraic multiplicity.

The geometric reason is that each eigenvalue gives the instantaneous fractional stretching or contraction rate in an eigenvector direction, and the total fractional volume-change rate is their sum.


6. Matrix Exponentials and Determinants

The matrix exponential describes the flow generated by AAA.

If a point starts at xxx and moves according to the vector field AxAxAx, then after time ttt its position is

x(t)=e^{tA}x.

Thus, applying etAe^{tA}etA to a region is equivalent to allowing the region to flow under the vector field for time ttt.

Determinant as an area-scaling factor

For a linear transformation, the determinant gives the factor by which areas are scaled in two dimensions, or volumes in higher dimensions.

Let S(t)S(t)S(t) denote the area of a region after flowing for time ttt. Since the trace is the rate of area change per unit area,

\frac{1}{S(t)}\frac{dS}{dt}=\operatorname{tr}(A).

Equivalently,

\frac{dS}{dt}=\operatorname{tr}(A)S(t).

Because tr⁡(A)\operatorname{tr}(A)tr(A) is constant, the solution is

S(t)=S(0)e^{t\operatorname{tr}(A)}.

If the original region is the unit square, then S(0)=1S(0)=1S(0)=1. Applying etAe^{tA}etA changes its area to

\det(e^{tA}).

Therefore,

\boxed{\det(e^{tA})=e^{t\operatorname{tr}(A)}.}

More generally, this relation is often written as

\boxed{\det(e^A)=e^{\operatorname{tr}(A)}.}

This identity follows naturally from the fact that the trace is the infinitesimal area- or volume-expansion rate, while the determinant records the total scaling factor.


7. Trace Is Independent of Basis

The trace does not depend on the choice of basis. This can be understood geometrically through an invertible linear transformation.

Let QQQ be an invertible matrix applied to the entire vector-field picture.

Transformation of points and attached vectors

A point xxx becomes

y=Qx.

Originally, the vector attached to xxx is AxAxAx. Under the transformation QQQ, that attached vector becomes

Q(Ax)=QAx.

Since x=Q−1yx=Q^{-1}yx=Q−1y, the transformed attached vector can be expressed in terms of yyy:

QAx

QAQ^{-1}y.

Therefore, the transformed vector field is generated by the matrix

QAQ^{-1}.

Why the divergence is unchanged

Applying QQQ scales every area by det⁡(Q)\det(Q)det(Q). However, divergence is a ratio:

\frac{\text{rate of area change}}{\text{area}}.

Both the numerator and denominator are multiplied by the same area-scaling factor, so that factor cancels. The divergence remains unchanged.

Because trace equals divergence,

\boxed{\operatorname{tr}(A)=\operatorname{tr}(QAQ^{-1}).}

Using Q=P−1Q=P^{-1}Q=P−1 gives the standard change-of-basis form:

\boxed{\operatorname{tr}(A)=\operatorname{tr}(P^{-1}AP).}

Thus, similar matrices have the same trace.

Consequences

Since a change of basis produces a similar matrix:

  • The trace represents an intrinsic property of the linear transformation.

  • The numerical entries on the diagonal may change under a basis change, but their sum does not.

  • The sum of eigenvalues is basis-independent because it equals the trace.


8. The Cyclic Property: tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB)=\operatorname{tr}(BA)tr(AB)=tr(BA)

A fundamental identity for compatible square matrices is

\boxed{\operatorname{tr}(AB)=\operatorname{tr}(BA).}

One way to derive it geometrically is to use similarity invariance.

Assume BBB is invertible. Insert the identity B−1BB^{-1}BB−1B:

AB

B^{-1}(BAB^{-1})B

is not the most direct useful rearrangement; instead, apply similarity invariance to the product ABABAB with the invertible matrix BBB:

\operatorname{tr}(AB)

\operatorname{tr}\left(B(AB)B^{-1}\right).

Associativity gives

B(AB)B^{-1}

(BA)(BB^{-1})

BA.

Therefore,

\operatorname{tr}(AB)=\operatorname{tr}(BA).

The geometric interpretation is that transforming the entire plane by an invertible change of coordinates does not alter the divergence, and hence does not alter the trace.

Although the similarity argument assumes invertibility for this derivation, the trace identity itself holds more generally whenever the matrix products are defined.


9. Jacobi’s Formula for the Derivative of a Determinant

Suppose A(t)A(t)A(t) is a differentiable, invertible matrix depending on time. Jacobi’s formula states

\boxed{ \frac{d}{dt}\det A(t)

\det A(t) \operatorname{tr}\left(A(t)^{-1}A'(t)\right). }

Here:

  • A′(t)A'(t)A′(t) is the derivative of the matrix with respect to ttt.

  • A(t)−1A(t)^{-1}A(t)−1 is the inverse matrix.

  • det⁡A(t)\det A(t)detA(t) represents the area or volume scaling factor.

  • The trace gives the instantaneous fractional rate of change of that area or volume.

The formula requires invertibility in this form because it contains A(t)−1A(t)^{-1}A(t)−1. A more general version uses the adjugate matrix and remains valid even when A(t)A(t)A(t) is singular.

Geometric setup

In two dimensions, det⁡A(t)\det A(t)detA(t) is the area of the parallelogram obtained by applying A(t)A(t)A(t) to the standard basis vectors.

As ttt changes:

  • The matrix A(t)A(t)A(t) changes.

  • The two transformed basis vectors move.

  • The parallelogram changes area.

  • The rate of change of its area is ddtdet⁡A(t)\frac{d}{dt}\det A(t)dtd​detA(t).

The goal is to identify a matrix that generates the motion of the parallelogram as a vector field.

Finding the generating matrix

At the points represented by the columns of A(t)A(t)A(t), the attached velocity vectors are obtained by applying A′(t)A'(t)A′(t) to the standard basis vectors.

For a general position vector y=A(t)xy=A(t)xy=A(t)x, the corresponding velocity is

A'(t)x.

Since

x=A(t)^{-1}y,

the velocity can be written in terms of yyy as

A'(t)A(t)^{-1}y.

Thus, one possible matrix generating the vector field is

M=A'(t)A(t)^{-1}.

Since trace is the fractional rate of area change,

\frac{d}{dt}\det A(t)

\det A(t) \operatorname{tr}\left(A'(t)A(t)^{-1}\right).

Using the cyclic trace property,

\operatorname{tr}\left(A'(t)A(t)^{-1}\right)

\operatorname{tr}\left(A(t)^{-1}A'(t)\right).

Therefore,

\boxed{ \frac{d}{dt}\det A(t)

\det A(t) \operatorname{tr}\left(A(t)^{-1}A'(t)\right). }

Alternative geometric viewpoint

One can instead apply A(t)−1A(t)^{-1}A(t)−1 to the entire picture. This sends the current parallelogram back to the standard unit square. Under this transformation, the attached velocity vectors are generated directly by

A(t)^{-1}A'(t).

The trace of this matrix is the instantaneous fractional area-change rate, so multiplying by the current area det⁡A(t)\det A(t)detA(t) yields Jacobi’s formula.


10. Summary of the Main Relationships

The geometric interpretation of trace connects several important matrix identities.

Trace and divergence

\boxed{ \operatorname{tr}(A)

\text{divergence of the vector field }x\mapsto Ax }

Trace is the instantaneous fractional rate of area or volume change under the linear flow generated by AAA.

Trace and eigenvalues

\boxed{ \operatorname{tr}(A)=\sum_i\lambda_i }

Each eigenvalue gives the stretching or contraction rate along an eigenvector direction.

Trace and matrix exponentials

\boxed{ \det(e^{tA})=e^{t\operatorname{tr}(A)} }

The determinant records the accumulated area or volume scaling of the flow, while the trace gives its instantaneous rate.

Trace and similarity transformations

\boxed{ \operatorname{tr}(A)=\operatorname{tr}(QAQ^{-1}) }

Trace is invariant under a change of basis.

Cyclic trace property

\boxed{ \operatorname{tr}(AB)=\operatorname{tr}(BA) }

The trace of a product is unchanged when the order of the two factors is cyclically reversed.

Jacobi’s formula

\boxed{ \frac{d}{dt}\det A(t)

\det A(t) \operatorname{tr}\left(A(t)^{-1}A'(t)\right) }

The derivative of a determinant equals the current determinant multiplied by the instantaneous fractional area- or volume-change rate.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent