Matrix Trace Calculator
Omni's matrix trace calculator is here to help you learn about the important mathematical concept of the trace of a matrix. Although it's not hard to learn how to calculate the trace of a matrix, it is important to understand the theoretical properties of the matrix trace. After reading the article below, you'll be able to answer the following questions:
- What is the trace of a matrix?
- What properties does the matrix trace have?
- What's the connection between trace and eigenvalues?
- Is the trace of a matrix a linear transformation?
- ... and many more!
Let's go!
What is the trace of a matrix?
We define the trace of a matrix as the sum of all the diagonal elements of this matrix. The matrix in question must be square, i.e., it must have as many columns as it has rows. For instance, the trace of the matrix, ,
is equal to . The trace of matrix is denoted by .
As you can see, it's not difficult to learn how to calculate the trace of a matrix. Let's now talk about the properties of the trace.
Matrix trace properties
If , , and are all square matrices, then their traces satisfy the following properties:
-
-
, where is a scalar. You can visit the matrix by scalar calculator if you're unsure about this type of multiplication.
-
-
-
, where is the matrix transpose of
-
, where denotes the tensor product (aka the Kronecker product) of matrices.
-
is equal to the sum of the eigenvalues of .
-
, where is the identity matrix.
💡 One can show that the first four properties above describe the trace operator uniquely. That is, if you're given an operator on matrices that satisfies them, it must be the trace operator! Nice, isn't it?
What is the cyclicity of the trace?
The trace is famous for its cyclic property. It basically means that the trace is invariant under cyclic permutations — the cyclical rearrangement of the matrices in a matrix product expression. For instance, for three matrices , , and , we have
and for four matrices we have
Do you see the pattern? In general, for matrices, we get
This is the cyclic property of the trace operator. It's good to remember this properly as it is often very useful in various math problems with matrix trace.
❗ The trace is the same for cyclic permutations, but it is not immune to any permutation! It may happen that ! Can you come up with an example?
How do I calculate the trace of a matrix?
To calculate the trace of a matrix by hand, you need to:
- Write down the coefficients of the matrix.
- Identify the diagonal entries — the diagonal going from the upper-left corner to the bottom-right corner.
- Add all the diagonal entries together.
- The result you've got in Step 3 is exactly the trace of your matrix!
To verify if your computations are correct, use Omni's matrix trace calculator!
How to use this matrix trace calculator?
This trace of a matrix calculator is very user-friendly! To use it, you need to:
- Choose the matrix size.
- Enter the matrix coefficients.
- The trace of your matrix gets calculated and displayed immediately.
- Remember the blank fields are interpreted as zeros!
FAQ
What is the trace of projection matrix?
The trace of a projection matrix is equal to the dimension of the space that the matrix projects onto (the target space). This is a special case of a more general result that the trace of an idempotent matrix (recall A
is called idempotent when A² = A
) is equal to the rank of this matrix.
Is the trace of a matrix a linear transformation?
Yes, the trace operation is linear. That is, it satisfies tr(x·A + y·B) = x × tr(A) + y × tr(B)
, where A
and B
are square matrices of the same size, and x
and y
are scalars.
How do I calculate the eigenvalues of a 2×2 matrix given trace and determinant?
Recall that the eigenvalues are the roots of the characteristic polynomial of a matrix. Since the characteristic polynomial of a 2×2 matrix A
reads p(λ) = x² − tr(A)·λ + det(A)
, the formula for its eigenvalues is ½ tr(A) ± ½√(tr(A)² − 4·det(A))
.
|
⌈ | 0 | 0 | ⌉ |
⌊ | 0 | 0 | ⌋ |