Locate the principal diagonal
For A=[[a₁₁,a₁₂,a₁₃],[a₂₁,a₂₂,a₂₃],[a₃₁,a₃₂,a₃₃]], the trace is tr(A)=a₁₁+a₂₂+a₃₃. The principal diagonal runs from the upper-left corner to the lower-right corner. The calculator has three fields, one for each of those diagonal values; it does not ask for the other six entries.
Because the tool receives only the diagonal, it can compute the trace without knowing the full matrix. That is useful for a quick check when the off-diagonal values are irrelevant to the requested sum. It also means the tool cannot validate the matrix dimensions or inspect any off-diagonal relationship.
Add signs and units carefully
Suppose the principal entries are 2, 3, and −1. Then tr(A)=2+3+(−1)=4. A negative diagonal term is added with its sign; subtracting a negative entry again would give the wrong total. If all entries represent quantities with the same unit, the trace carries that unit.
For diag(−2,0,5), the trace is −2+0+5=3. These two examples show why trace is not the sum of absolute values: the first total is 4, while replacing −1 by +1 would make it 6. The calculator displays the sum to six decimal places and does not infer units.
Worked examples
Example 1 · one negative diagonal entry
Inputs: Diagonal entries a₁₁=2, a₂₂=3, a₃₃=−1.
Calculation: 2+3+(−1)=4.
tr(A)=4.000000.
Example 2 · zero in the middle
Inputs: Diagonal entries a₁₁=−2, a₂₂=0, a₃₃=5.
Calculation: −2+0+5=3.
tr(A)=3.000000; the trace is not the sum of absolute entries.
What trace can summarize
Trace appears in several matrix identities. For a square matrix, it equals the sum of the eigenvalues counted with algebraic multiplicity over the complex numbers. It is also the sum of diagonal entries of the matrix representation in a chosen basis. These facts make it useful in linear algebra, but they do not turn trace into a replacement for the matrix itself.
For example, matrices with very different off-diagonal entries can have the same diagonal and therefore the same trace. A trace of 4 does not imply that each direction is scaled by four, that the determinant is four, or that the matrix is invertible. Use the determinant, eigenvalues, or the full transformation when the question requires those properties.
Why changing basis does not change the trace
If two matrices represent the same linear operator in different bases, they are related by a similarity transformation B=P⁻¹AP, where P is invertible. Their traces agree because tr(XY)=tr(YX): tr(P⁻¹AP)=tr(APP⁻¹)=tr(A). This is why trace is a property of the operator rather than an accident of one coordinate basis.
This invariance applies to a valid change of basis, not to arbitrary edits or a different physical system. When comparing data tables, coordinate frames, or models, first establish that the matrices represent the same operator and that the transformation is a similarity. The three-field calculator only adds values; it does not verify that mathematical relationship.
Avoid confusing trace with nearby ideas
The trace differs from determinant, Frobenius norm, and matrix-vector output. Trace is a signed diagonal sum. The determinant measures signed volume scaling; the Frobenius norm aggregates squared magnitudes of all entries; multiplying A by x gives a vector. A matrix may have trace zero and still be nonzero, invertible, or produce nonzero outputs.
For instance, diag(1,−1,0) has trace zero although two diagonal entries are nonzero. A zero trace is therefore not a test for a zero matrix. Likewise, an unchanged trace does not imply unchanged eigenvectors or unchanged behavior on a particular input vector.
Verify the fields and the total
Enter a₁₁, a₂₂, and a₃₃ in that order. For a matrix printed in row-major form, read the first entry, the center entry, and the bottom-right entry; do not take the first three values in the row. Retain negative signs and avoid including a₁₂ or a₂₃ by mistake.
A hand check is simply the signed sum of the three inputs. If the full matrix is available, mark its main diagonal before transcribing. The result is exact for exact inputs, but decimal inputs and the six-place display may round. This calculator answers “what is the diagonal sum?”; it does not decide whether that scalar is meaningful for a particular model.