![]() |
VOOZH | about |
The trace of a matrix refers to the sum of the diagonal elements in a square matrix. It is a key concept in linear algebra and is widely used in mathematics, physics, machine learning, and other applied fields.
For a square matrix A of order n×n, the trace is denoted as tr(A) or trace(A) and is defined as the sum of the principal diagonal elements:
tr(A) = a11 + a22 + a33 + ⋯ + ann or trace(A) = ⅀nn=1 Ann
where a11, a22, a33, …, are the diagonal elements of the matrix A
For example, let us consider a square matrix of order "3 × 3," as shown in the figure given below:
a11, a12, a13,..., a32, and a33 are the entries of the given matrix A.
Now, the trace of matrix "A" is equal to the sum of its principal diagonal elements, i.e., a11, a22, and a33.
The following are some important properties of a trace of a matrix. Let us consider two square matrices A and B of the same order.
The sum of the traces of the matrix A and the matrix B is equal to the trace of the matrix that is obtained by the sum of the matrices A and B.
tr(A) + tr(B) = tr (A + B)
The trace of a given matrix and its transpose are the same.
tr(A) = tr (AT)
If A is any square matrix of order "n × n" and k is a scalar, then
tr(kA) = k Tr(A)
If A is a matrix of order "m × n" and B is a matrix of order "n × m," then the trace of AB is equal to the trace of BA.
tr (AB) = tr (BA)
The above statement is true if both AB and BA are defined.
The trace of an identity matrix of order "n × n" is n.
tr(In) = n
The trace of a zero or null matrix of any order is zero.
tr(O) = 0
Example 1: Prove that the trace of an identity matrix of order "3 × 3" is 3.
Solution:
Let us consider an identity matrix of order "3 × 3" to prove the trace of an identity matrix of order "3 × 3" is 3.
I3 =
We know that,
tr(A) = a11 + a22 + a33
tr(A) = 1 + 1 + 1 =3
Hence, proved.
Example 2: Calculate the trace of the matrix given below.
B =
Solution:
From the given matrix,
b11 = 1, b22 = 11, b33 = −5, and b44 = −4.We know that,
tr(A) = b11 + b22 + b33 + b44
= 1 + 11 + (−5) + (−4)
= 12 −5 −4 = 12 − 9 = 3Thus, the trace of the given matrix B is 3.
Example 3: Calculate the trace of the matrix given below.
👁 Example 3Solution:
From the given matrix,
a11 = 0, a22 = 24, a33 = 7, a44 = −5, and a55 = 16.We know that,
tr(A) = a11 + a22 + a33 + a44 + a55
= 0 + 24 + 7 + (−5) + 16
= 47 −5 = 42Thus, the trace of the given matrix A is 42.
Example 4: If R = P + Q, then prove that tr(R) = tr(P) + tr(Q), where "P, Q, and R" are square matrices of order "2 × 2"
Solution:
Let P = Q =
R = P + Q =
Now, tr(R) = p11 + q11 + p22 + q22
tr(R) = p11 + p22 + q11 + q22
tr(P) = p11 + p22
tr(Q) = q11 + q22
tr(P) + tr(Q) = p11 + p22 + q11 + q22
tr(P) + tr(Q) = tr(R)Hence, proved.
Question 1: Given the matrix, calculate the trace of matrix A.
Question 2: Find the trace of the matrix
Question 3: Given the diagonal matrix, compute the trace of matrix C.
Question 4: If the trace of matrix A = is 5, then find the value of x.
Answer key
Answer 1: The trace of the matrix equals 10.
Answer 2: The trace of the matrix equals 15.
Answer 3: The trace of the matrix equals 17.
Answer 4: The value of x is 2