# Trace of a Matrix

A matrix is defined as a rectangular array of numbers that are arranged in rows and columns. The size of a matrix can be determined by the number of rows and columns in it. A matrix is said to be an “m by n” matrix when it has “m” rows and “n” columns and is written as an “m Ã— n” matrix. For example, if a matrix has three rows and four columns, then the order of the matrix is “3 Ã— 4.” We have different types of matrices, such as rectangular, square, triangular, symmetric, etc.

## Square Matrix

Before learning the concept of the trace of a matrix, we need to know about a square matrix. A square matrix is defined as a matrix that has an equal number of rows and columns. For example, if the order of a square matrix is “3 Ã— 3,” then it has three rows and three columns.

Square Matrix of order “2 Ã— 2”

A =

Square matrix of order “3 Ã— 3”

B =

## What is Trace of a Matrix?

Trace of a matrix is defined as the sum of the principal diagonal elements of a square matrix. It is usually represented as tr(A), where A is any square matrix of order “n Ã— n.” Let us consider a square matrix of order “3 Ã— 3,” as shown in the figure given below, a_{11}, a_{12}, a_{13},…, a_{32}, a_{33} 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., a_{11}, a_{22}, and a_{33}.

If A is a square matrix of order “n Ã— n,” then the trace of matrix A is equal to the sum of the main diagonal elements.

tr(A) = a_{11}+ a_{22}+ a_{33}+ …+ a_{nn}

## Properties of Trace of a Matrix

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 (A^{T})

- 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(I_{n}) = n

- The trace of a zero or null matrix of any order is zero.

tr(O) = 0

**Also, Check**

## Solved Examples on Trace of a Matrix

**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.

I

_{3}=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,

b

_{11}= 1, b_{22}= 11, b_{33}= âˆ’5, and b_{44}= âˆ’4.We know that,

tr(A) = b

_{11}+ b_{22}+ b_{33}+ b_{44}= 1 + 11 + (âˆ’5) + (âˆ’4)

= 12 âˆ’5 âˆ’4 = 12 âˆ’ 9 = 3

Thus, the trace of the given matrix B is 3.

**Example 3: Calculate the trace of the matrix given below.**

**Solution:**

From the given matrix,

a

_{11}= 0, a_{22}= 24, a_{33}= 7, a_{44}= âˆ’5, and a_{55}= 16.We know that,

tr(A) = a

_{11}+ a_{22}+ a_{33}+ a_{44}+ a_{55}= 0 + 24 + 7 + (âˆ’5) + 16

= 47 âˆ’5 = 42

Thus, 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) = p

_{11}+ q_{11}+ p_{22}+ q_{22}tr(R) = p

_{11}+ p_{22 }+ q_{11}+ q_{22}tr(P) = p

_{11 }+ p_{22}tr(Q) = q

_{11}+ q_{22}tr(P) + tr(Q) = p

_{11}+ p_{22}+ q_{11}+ q_{22}tr(P) + tr(Q) = tr(R)

Hence, proved.

## FAQs on Trace of a Matrix

**Question 1: What is a square matrix?**

**Answer:**

A square matrix is defined as a matrix that has an equal number of rows and columns. For example, if the order of a square matrix is “3 Ã— 3,” then it has three rows and three columns.

**Question 2: What is meant by the trace of a matrix?**

**Answer:**

The trace of a matrix is defined as the sum of the principal diagonal elements of a square matrix. It is usually represented as tr(A), where A is any square matrix of order “n Ã— n.”

**Question 3: What is the trace of a null matrix?**

**Answer:**

The trace of a zero or null matrix of any order is zero, i.e., tr(O) = 0.

**Question 4: What is the trace of an identity matrix of order n?**

**Answer:**

The trace of an identity matrix of order “n Ã— n” is n, i.e., tr (I

_{n}) = n.

tr (I_{n}) = 1 + 1+ 1 + …+ 1 (n times) = n

## Please

Loginto comment...