Trace (linear algebra) (source code)

= Trace (linear algebra)
{wiki=Trace_(linear_algebra)}

In linear algebra, the **trace** of a square matrix is defined as the sum of its diagonal elements. If \\( A \\) is an \\( n \\times n \\) matrix, the trace is mathematically expressed as: \\\[ \\text\{Trace\}(A) = \\sum_\{i=1\}^\{n\} A_\{ii\} \\\] where \\( A_\{ii\} \\) denotes the elements on the main diagonal of the matrix \\( A \\).