Matrix Trace Calculator (3x3)
The trace of a square matrix is the sum of its main diagonal elements. For a 3x3 matrix, that is the entry in row 1 column 1, plus row 2 column 2, plus row 3 column 3. Enter the nine elements of a 3x3 matrix and this calculator returns the trace, the determinant computed by Sarrus' rule, and the transpose. The trace has useful algebraic properties: it is linear, cyclic under multiplication (trace(AB) = trace(BA)), and equals the sum of all eigenvalues. For the determinant, Sarrus' rule takes the sum of the three descending diagonal products minus the sum of the three ascending diagonal products. The transpose swaps each entry a(i,j) with a(j,i), reflecting the matrix across its main diagonal. Together, these three properties characterise a matrix's fundamental behaviour and appear throughout linear algebra, quantum mechanics, and computer graphics. The diagonal elements (top-left to bottom-right) that form the trace are highlighted in the output.
Enter 3x3 matrix
Formulas
Matrix A = [[a,b,c],[d,e,f],[g,h,i]]
Trace(A) = a + e + i
Det(A) = a(ei-fh) - b(di-fg) + c(dh-eg)
Sarrus: aei + bfg + cdh - ceg - bdi - afh
Transpose A^T: swap a_ij and a_ji
Matrix trace: frequently asked questions
What is the trace of a matrix?
The trace of a square matrix is the sum of the elements on its main diagonal (top-left to bottom-right). For a 3x3 matrix with entries a11, a22, a33 on the diagonal, trace = a11 + a22 + a33. The trace is invariant under similarity transformations: trace(A) = trace(P^(-1)*A*P) for any invertible P.
What is Sarrus' rule for the 3x3 determinant?
Sarrus' rule expands a 3x3 determinant by rewriting the first two columns to the right of the matrix. The three downward diagonal products are added, and the three upward diagonal products are subtracted. For matrix [[a,b,c],[d,e,f],[g,h,i]], det = a*e*i + b*f*g + c*d*h - c*e*g - b*d*i - a*f*h.
What properties does the trace have?
The trace is linear: trace(A+B) = trace(A) + trace(B) and trace(cA) = c*trace(A). The trace of a product is cyclic: trace(ABC) = trace(BCA) = trace(CAB). The trace equals the sum of eigenvalues of the matrix. For symmetric matrices, the trace is the sum of squared norms of rows.
What is the transpose of a matrix?
The transpose of a matrix A, written A^T, is formed by reflecting A over its main diagonal: row i of A becomes column i of A^T. For a 3x3 matrix with entry a_ij at row i column j, the transpose has entry a_ji at row i column j. The trace is preserved under transposition: trace(A^T) = trace(A).
How is the trace related to eigenvalues?
For any square matrix, the trace equals the sum of all eigenvalues (counted with multiplicity), and the determinant equals the product of all eigenvalues. For a 2x2 matrix, the characteristic polynomial is x^2 - trace(A)*x + det(A) = 0. For a 3x3 matrix, the coefficients of the characteristic polynomial involve the trace, the sum of 2x2 minors, and the determinant.
Sources
- Matrix operations reference: NIST DLMF 1.2, Elementary Algebra.
- Linear algebra: Wolfram MathWorld, Matrix Trace.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.