banner



How To Calculate Trace Of A Matrix

The trace of a foursquare matrix is the sum of its diagonal entries.

The trace has several backdrop that are used to prove of import results in matrix algebra and its applications.

Table of Contents

Tabular array of contents

  1. Definition

  2. Examples

  3. Properties

    1. Trace of a sum

    2. Trace of a scalar multiple

    3. Trace of a linear combination

    4. Trace of the transpose of a matrix

    5. Trace of a product

    6. Trace of a scalar

  4. Solved exercises

    1. Exercise ane

    2. Exercise 2

Let us start with a formal definition.

Definition Let A be a $K	imes K$ matrix. Then, its trace, denoted by [eq1] or [eq2] , is the sum of its diagonal entries: [eq3]

Some examples follow.

Example Define the matrix [eq4] Then, its trace is [eq5]

Example Define the matrix [eq6] And so, its trace is [eq7]

The following subsections report some useful backdrop of the trace operator.

Trace of a sum

The trace of a sum of ii matrices is equal to the sum of their traces.

Proposition Let A and $B$ exist 2 $K	imes K$ matrices. Then, [eq8]

Proof

Remember that the sum of ii matrices is performed by summing each element of 1 matrix to the corresponding element of the other matrix (meet the lecture on Matrix addition). Every bit a consequence, [eq9]

Trace of a scalar multiple

The next proffer tells us what happens to the trace when a matrix is multiplied by a scalar.

Proposition Let A be a $K	imes K$ matrix and $lpha $ a scalar. So, [eq10]

Proof

Call back that the multiplication of a matrix by a scalar is performed by multiplying each entry of the matrix past the given scalar (run across the lecture on Multiplication of a matrix by a scalar). Equally a consequence, [eq11]

Trace of a linear combination

The two properties above (trace of sums and scalar multiples) imply that the trace of a linear combination is equal to the linear combination of the traces.

Proposition Let A and $B$ be ii $K	imes K$ matrices and $lpha $ and $eta $ two scalars. Then, [eq12]

Trace of the transpose of a matrix

Transposing a matrix does not change its trace.

Proposition Allow A exist a $K	imes K$ matrix. And so, [eq13]

Proof

The trace of a matrix is the sum of its diagonal elements, merely transposition leaves the diagonal elements unchanged.

Trace of a product

The next proposition concerns the trace of a product of matrices.

Proposition Let A exist a $K	imes L$ matrix and $B$ an $L	imes K$ matrix. Then, [eq14]

Proof

Trace of a scalar

A trivial, just often useful property is that a scalar is equal to its trace because a scalar tin can exist thought of as a $1	imes 1$ matrix, having a unique diagonal element, which in plough is equal to the trace.

This property is often used to write dot products as traces.

Example Let A be a $1	imes K$ row vector and $B$ a Kx1 cavalcade vector. And then, the production $AB$ is a scalar, and [eq18] where in the last step we accept use the previous proposition on the trace of matrix products. Thus, we have been able to write the scalar $AB$ as the trace of the $K	imes K$ matrix $BA$ .

Below you can find some exercises with explained solutions.

Exercise 1

Let A be a $3	imes 3$ matrix defined past [eq19] Discover its trace.

Solution

Past summing the diagonal elements, nosotros obtain [eq20]

Exercise 2

Allow A be a $K	imes K$ matrix and x a Kx1 vector. Write the product [eq21] every bit the trace of a product of two $K	imes K$ matrices.

Solution

Since $x^{	op }Ax$ is a scalar, we have that [eq22] Furthermore, $x^{	op }A$ is $1	imes K$ and x is Kx1 . Therefore, [eq23] where both $xx^{	op }$ and A are $K	imes K$ .

Please cite as:

Taboga, Marco (2021). "Trace of a matrix", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/trace-of-a-matrix.

Source: https://statlect.com/matrix-algebra/trace-of-a-matrix

0 Response to "How To Calculate Trace Of A Matrix"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel