A matrixA is a structured array of elements, either real or complex numbers, arranged in horizontal rows and vertical columns. Formally, an m×n matrix is represented as:
where aij denotes the element located in the i-th row and j-th column. Here, m is the number of rows (horizontal), and n is the number of columns (vertical), determining the matrix's dimension as m×n.
Rows and Columns: The rows of a matrix are the horizontal lines of elements, while the columns are the vertical lines. For instance, in a 2×3 matrix:
B=[b11b21b12b22b13b23]
B has 2 rows and 3 columns.
Dimensions: The dimension m×n of a matrix specifies its structure. For example:
A 1×3 matrix:
C=[c11c12c13]
is a single row with three elements.
A 3×1 matrix:
D=d11d21d31
is a single column with three elements.
A 2×2 matrix:
E=[e11e21e12e22]
has 2 rows and 2 columns.
No Vacant Slots: Every position within a matrix must be filled with an element aij. It is illegal and invalid for any slot in the matrix to be vacant. Each entry is essential, and the matrix is not defined if any element is missing. This requirement distinguishes matrices from sets, as matrices cannot be empty.
Minimum Size: The smallest possible matrix is a 1×1 matrix, such as:
F=[f11]
which contains a single element.
In summary, a matrix is a well-defined array with every slot filled by an element, and it must have at least one row and one column. The arrangement of elements into rows and columns gives the matrix its dimension, which is a fundamental characteristic of its structure.
Consider a 3×4 matrix G, where the matrix has 3 rows and 4 columns. Each element in the matrix is distinct and denoted by specific numerical values. The matrix is represented as:
G=7241381514129116
In this matrix:
The first row consists of the elements 7,13,5, and 9.
The second row contains the elements 2,8,14, and 11.
The third row includes the elements 4,1,12, and 6.
Here, the element 8 is located in the second row and second column, denoted as g22=8. Similarly, g23=14 refers to the element in the second row and third column.
A matrix A of dimension m×n can be compactly represented using the notation:
A=[aij]m×n
Here, aij denotes the element in the i-th row and j-th column of the matrix, where the indices i and j satisfy:
1≤i≤mand1≤j≤n
This notation indicates that A is an m×n matrix, with m rows and n columns. Each element aij is uniquely identified by the pair of indices i and j, where i is the row index and j is the column index.
An Identity Matrix is a square matrix in which all the elements of the main diagonal are 1, and all other elements are 0. For an identity matrix I=[iij]n×n:
iij={10if i=jif i=j
Example:
I=1000100013×3
2. Scalar Matrix
A Scalar Matrix is a square matrix in which all the elements of the main diagonal are equal to some constant k, and all other elements are 0. For a scalar matrix S=[sij]n×n:
sij={k0if i=jif i=j
Example:
S=5000500053×3
3. Diagonal Matrix
A Diagonal Matrix is a square matrix in which all the elements outside the main diagonal are 0. For a diagonal matrix D=[dij]n×n:
dij={dii0if i=jif i=j
In diag notation, a diagonal matrix can be represented as:
D=diag(d11,d22,…,dnn)
Example:
D=7000300043×3
4. Lower Triangular Matrix
A Lower Triangular Matrix is a square matrix in which all the elements above the main diagonal are 0. For a lower triangular matrix L=[lij]n×n:
lij=0for all i<j
Example:
L=4210530063×3
5. Upper Triangular Matrix
An Upper Triangular Matrix is a square matrix in which all the elements below the main diagonal are 0. For an upper triangular matrix U=[uij]n×n:
uij=0for all i>j
Example:
U=1002503693×3
When comparing matrices, the concept of "greater than" or "less than" does not apply as it does with individual numbers. Instead, matrices are primarily compared based on equality.
Matrices are fundamental mathematical objects, much like real numbers. When we define any mathematical object, we also define the operations that can be performed on them. For real numbers, we have operations like addition, subtraction, multiplication, and division. Similarly, matrices have their own set of operations, such as addition, multiplication, and scalar multiplication.
Two matrices A=[aij]m×n and B=[bij]m×n are said to be equal if and only if:
Same Dimensions: The matrices must have the same dimensions, i.e., they must have the same number of rows and the same number of columns. Formally, if A is m×n, then B must also be m×n.
Element-wise Equality: Each corresponding element of the two matrices must be equal. That is:
aij=bijfor all1≤i≤mand1≤j≤n
Example of Matrix Equality
Consider two matrices A and B:
A=[243658],B=[243658]
Here, both matrices A and B are 2×3 matrices, and corresponding elements are equal:
Matrix addition is one of the fundamental operations defined for matrices, similar to addition for real numbers. When adding matrices, we combine them element-wise, provided they have the same dimensions.
Definition of Matrix Addition
Given two matrices A=[aij]m×n and B=[bij]m×n, the sum C=A+B is a matrix C=[cij]m×n where each element cij is given by:
cij=aij+bijfor all1≤i≤m,1≤j≤n
This means that the corresponding elements of A and B are added together to produce the elements of C.
Conditions for Matrix Addition
Same Dimensions: The matrices A and B must have the same number of rows and columns. Matrix addition is not defined for matrices of different dimensions.
Example of Matrix Addition
Consider the following matrices A and B:
A=[142536],B=[710811912]
To find the sum C=A+B, we add the corresponding elements:
C=[1+74+102+85+113+96+12]=[81410161218]
Properties of Matrix Addition
Matrix addition possesses several important properties that make it a well-defined operation in linear algebra. These properties are analogous to those of addition for real numbers and are essential for understanding how matrices behave under addition.
Commutativity
Matrix addition is commutative, which means that the order in which matrices are added does not affect the result. Specifically, for any two matrices A and B of the same dimensions:
Matrix addition is associative, which means that when adding three matrices, the grouping of the matrices does not affect the result. Specifically, for any three matrices A, B, and C of the same dimensions:
(A+B)+C=A+(B+C)
Example:
Let A=[1203], B=[4657], and C=[810911]. Then:
Scalar multiplication is an operation where a matrix is multiplied by a scalar (a single number). This operation is analogous to multiplying each element of a vector or a list by a number, but it is applied to all elements of a matrix.
Definition of Scalar Multiplication
Given a matrix A=[aij]m×n and a scalar k, the scalar multiplication of A by k results in a new matrix B=kA=[bij]m×n where each element bij is given by:
bij=k⋅aijfor all1≤i≤m,1≤j≤n
This means that the scalar k multiplies every element of the matrix A.
Example of Scalar Multiplication
Consider a matrix A and a scalar k=3:
A=[20−134−5]
To find the matrix B=3A, multiply each element of A by 3:
Scalar multiplication of matrices has several important properties:
Distributivity Over Matrix Addition:
k(A+B)=kA+kB
Where A and B are matrices of the same dimensions and k is a scalar.
Distributivity Over Scalar Addition:
(k+l)A=kA+lA
Where k and l are scalars and A is a matrix.
Associativity of Scalar Multiplication:
k(lA)=(kl)A
Where k and l are scalars and A is a matrix.
Multiplication by 1:
1⋅A=A
Where 1 is the scalar one and A is any matrix. This property shows that multiplying any matrix by 1 leaves it unchanged.
Multiplication by 0:
0⋅A=O
Where 0 is the scalar zero, and O is the zero matrix of the same dimensions as A. This property shows that multiplying any matrix by 0 results in a zero matrix.
Matrix subtraction is defined as the addition of one matrix to the additive inverse (or negative) of another matrix. If you have two matrices A and B, the subtraction A−B is performed by adding A to the negative of B.
Definition of Matrix Subtraction
Given two matrices A=[aij]m×n and B=[bij]m×n, the subtraction C=A−B is defined as:
C=A+(−B)
Where −B=[−bij]m×n is the matrix obtained by negating each element of B. The resulting matrix C=[cij]m×n has elements:
cij=aij−bijfor all1≤i≤m,1≤j≤n
Example of Matrix Subtraction
Consider the matrices A and B:
A=[5782−34],B=[3265−1−4]
To find the matrix C=A−B, first determine the negative of B:
Matrix multiplication can initially seem complex, but it becomes clearer when we break it down with a concrete example. Let's consider two matrices A and B with the following dimensions and elements:
A=1471025811369124×3,B=1234563×2
To find the product AB, we need to perform the following steps:
Step-by-Step Calculation:
First row of A with all columns of B:
First row of A: [1,2,3]
First column of B: [1,2,3]
Dot product=1⋅1+2⋅2+3⋅3=1+4+9=14
Second column of B: [4,5,6]
Dot product=1⋅4+2⋅5+3⋅6=4+10+18=32
Resulting first row of AB: [14,32]
Second row of A with all columns of B:
Second row of A: [4,5,6]
First column of B: [1,2,3]
Dot product=4⋅1+5⋅2+6⋅3=4+10+18=32
Second column of B: [4,5,6]
Dot product=4⋅4+5⋅5+6⋅6=16+25+36=77
Resulting second row of AB: [32,77]
Third row of A with all columns of B:
Third row of A: [7,8,9]
First column of B: [1,2,3]
Dot product=7⋅1+8⋅2+9⋅3=7+16+27=50
Second column of B: [4,5,6]
Dot product=7⋅4+8⋅5+9⋅6=28+40+54=122
Resulting third row of AB: [50,122]
Fourth row of A with all columns of B:
Fourth row of A: [10,11,12]
First column of B: [1,2,3]
Dot product=10⋅1+11⋅2+12⋅3=10+22+36=68
Second column of B: [4,5,6]
Dot product=10⋅4+11⋅5+12⋅6=40+55+72=167
Resulting fourth row of AB: [68,167]
The resulting matrix AB is:
AB=1432506832771221674×2
Understanding the Process
In matrix multiplication, each element of the product matrix AB is obtained by taking the dot product of a row vector from A with a column vector from B. This operation is called the inner product.
For matrix multiplication to be valid, the number of columns in A must equal the number of rows in B. If this condition is not met, the matrices are not conformable, meaning they cannot be multiplied.
Defining Conformable Matrices
Matrices A and B are said to be conformable for multiplication if the number of columns in A equals the number of rows in B. Specifically:
If A has dimensions m×p and B has dimensions p×n, then the matrices are conformable.
The resulting product AB will have dimensions m×n.
Definition of Matrix Multiplication
Let A=[aij]m×p and B=[bjk]p×n be two conformable matrices. The product AB=[cik]m×n is defined as:
cik=j=1∑paijbjk
This means that each element cik in the resulting matrix AB is the sum of the products of corresponding elements from the i-th row of A and the k-th column of B. In other words:
Matrix multiplication is generally not commutative, meaning that the order in which matrices are multiplied affects the result. There are several reasons why this is the case:
Non-Conformable Matrices:
One key reason for non-commutativity is that the product AB might be defined, but the reverse product BA may not be, due to the matrices being non-conformable. For example, if A is a 3×4 matrix and B is a 4×5 matrix, then AB is defined and will be a 3×5 matrix. However, BA is not defined because B has 5 columns, and A has 3 rows, making them non-conformable for multiplication.
Different Dimensions:
Even when both AB and BA are defined, their dimensions may differ, which is another reason they may not be equal. Suppose A is an m×n matrix, and B is an n×m matrix. The product AB will be an m×m matrix, while BA will be an n×n matrix. If m=n, the dimensions of AB and BA do not match, and they cannot be directly compared.
Square Matrices:
Even when both matrices are square (i.e., A and B are both n×n matrices), the products AB and BA may still not be equal. This is because the elements of the matrices interact differently depending on the order of multiplication.
Since AB=BA, this example illustrates that even when matrices are square and conformable, matrix multiplication is generally not commutative.
Associativity of Matrix Multiplication
Matrix multiplication is associative, meaning that the grouping of matrices during multiplication does not change the final result. Specifically, for any three conformable matrices A, B, and C, we have:
(AB)C=A(BC)
Proof Outline:
Let A be an m×p matrix, B a p×q matrix, and C a q×n matrix. The product AB results in an m×q matrix, and multiplying this by C yields an m×n matrix. Similarly, the product BC is a p×n matrix, and multiplying this by A also results in an m×n matrix. Since both sides result in matrices of the same dimensions, we proceed to show that their elements are equal.
Consider the element in the i-th row and j-th column of the matrix product A(BC):
[A(BC)]ij=k=1∑paik(BC)kj
Next, express (BC)kj as the sum of products of elements from B and C:
(BC)kj=r=1∑qbkrcrj
Substitute this into the original sum:
[A(BC)]ij=k=1∑paik(r=1∑qbkrcrj)
This double sum can be written as:
[A(BC)]ij=k=1∑pr=1∑qaikbkrcrj
Now, consider the element in the i-th row and j-th column of the matrix product (AB)C:
[(AB)C]ij=r=1∑q(AB)ircrj
Express (AB)ir as:
(AB)ir=k=1∑paikbkr
Substitute this into the sum:
[(AB)C]ij=r=1∑q(k=1∑paikbkr)crj
This can also be written as:
[(AB)C]ij=k=1∑pr=1∑qaikbkrcrj
Since both [A(BC)]ij and [(AB)C]ij are expressed as the same double sum:
[A(BC)]ij=[(AB)C]ij
Thus, the matrix A(BC) is equal to the matrix (AB)C, proving that matrix multiplication is associative.
Distributivity of Matrix Multiplication
Matrix multiplication is distributive over matrix addition, which means that multiplying a matrix by a sum of matrices gives the same result as multiplying each matrix individually and then adding the results. This distributive property can be expressed in two forms: left distributivity and right distributivity.
1. Left Distributivity
For matrices A, B, and C, where A is conformable with both B and C, the left distributive property states:
A(B+C)=AB+AC
Proof
Let A be an m×p matrix, and let B and C both be p×n matrices. Then the sum B+C is also a p×n matrix, and A(B+C) is an m×n matrix.
In matrix algebra, the multiplicative identity is a matrix that, when multiplied by another matrix, leaves the original matrix unchanged. For a matrix A of dimensions m×n, there are two identity matrices that serve as the left and right identities: Im and In.
Left Identity Im and Right Identity In
Left Identity: The matrix Im is the m×m identity matrix, which, when multiplied on the left side of A, results in A:
ImA=A
Right Identity: The matrix In is the n×n identity matrix, which, when multiplied on the right side of A, results in A:
AIn=A
Example: A is a 2×3 Matrix
Consider a matrix A with dimensions 2×3:
A=[142536]
Left Identity I2:
The left identity matrix I2 is a 2×2 identity matrix:
The multiplicative inverse of a matrix is a matrix that, when multiplied by the original matrix, results in the identity matrix. The multiplicative inverse exists only for square matrices (matrices with the same number of rows and columns) and only under certain conditions, which we will explore later.
For a square matrix A, the inverse is denoted by A−1. The matrix A−1 is defined by the property:
AA−1=A−1A=I
where I is the identity matrix of the same dimension as A.
This means that when you multiply A by its inverse A−1, whether on the left or the right, the result is the identity matrix. We will study more about it in later section.
For a square matrix X and a natural number n∈N, the power Xn is defined as the matrix X multiplied by itself n times:
Xn=n timesXX⋯X
This operation is valid only for square matrices, where the number of rows and columns are equal.
Properties of Matrix Powers
Multiplication of Powers:
For any natural numbers m and n:
XmXn=Xm+n
This property follows from the definition of matrix multiplication, where multiplying Xm by Xn results in a matrix that has m+n factors of X.
Power of a Power:
For any natural numbers m and n:
(Xm)n=Xmn
This means that taking the n-th power of Xm is equivalent to multiplying the matrix X by itself mn times.
These properties are analogous to the properties of exponents for real numbers, but they hold within the context of matrix multiplication, which requires X to be a square matrix.
Given two square matrices A and B, the expansion of powers of their sum or difference follows the rules of matrix multiplication, keeping in mind that, in general, AB=BA. Here’s how these expansions work:
1. Expansion of (A+B)2
Expanding (A+B)2 gives:
(A+B)2=(A+B)(A+B)
Expanding this product using the distributive property:
(A+B)(A+B)=A2+AB+BA+B2
Since AB and BA are generally not equal, we cannot combine or simplify these terms further. The final expression is:
(A+B)2=A2+AB+BA+B2
2. Expansion of (A+B)(A−B)
Expanding (A+B)(A−B) gives:
(A+B)(A−B)=A2−AB+BA−B2
Again, because AB and BA are not necessarily equal, this expression cannot be simplified further.
3. Expansion of (A+B)3
To expand (A+B)3, we proceed similarly:
(A+B)3=(A+B)(A+B)2
Using the expansion from (A+B)2:
(A+B)3=(A+B)(A2+AB+BA+B2)
Now distribute (A+B):
(A+B)(A2+AB+BA+B2)=A3+A2B+ABA+AB2+BA2+BAB+B2A+B3
This expanded form cannot be simplified further due to the non-commutativity of matrix multiplication.
Summary
When working with powers of sums or differences of matrices, the lack of commutativity (i.e., AB=BA) prevents us from simplifying the expressions as we might with real numbers. Instead, we must expand and maintain all terms, acknowledging that products like AB and BA are distinct and cannot be combined.
Two matrices A and B are said to be commutative if their product does not depend on the order of multiplication, i.e., if:
AB=BA
This property is quite special because, in general, matrix multiplication is not commutative.
When Matrices A and B Are Not Commutative
If A and B are not commutative (i.e., AB=BA), then when you square the product AB, you must explicitly multiply as follows:
(AB)2=(AB)(AB)=ABAB
In this case, you cannot simplify ABAB further because A and B do not commute.
When Matrices A and B Are Commutative
If A and B are commutative (i.e., AB=BA), the product (AB)2 simplifies similarly to the way powers work for real numbers:
(AB)2=(AB)(AB)=ABAB
Given that AB=BA, you can rewrite this as:
ABAB=A(BA)B=A(AB)B=(AA)(BB)=A2B2
Thus, when A and B commute, the square of the product AB simplifies to A2B2, just like the multiplication of real numbers.
When two matrices A and B are commutative, i.e., AB=BA, for any natural number n, the following holds:
ABn=BnA
Proof
Given that A and B are commutative matrices, i.e., AB=BA, we want to prove that ABn=BnA for any natural number n.
We start by expanding ABn:
ABn=An timesBB⋯B
We can proceed by moving the matrix A through each B, using the commutative property AB=BA:
First, move A past the first B:
ABn=(AB)Bn−1=(BA)Bn−1=BABn−1
Next, move A past the second B:
BABn−1=B(AB)Bn−2=B(BA)Bn−2=B2ABn−2
Continue this pattern, moving A past each remaining B:
B2ABn−2=B3ABn−3=⋯=Bn−1AB=BnA
Thus, we have shown that:
ABn=BnA
This proves the property without using mathematical induction, simply by following the pattern of moving A through each B.
Proof Using Mathematical Induction:
If you're familiar with mathematical induction, here’s a formal proof using that method:
Base Case:
For n=1, we have:
AB1=AB
Given that AB=BA, the base case holds:
AB=BA
Inductive Step:
Assume that ABk=BkA holds for some k≥1. We need to show that:
ABk+1=Bk+1A
Starting with the left-hand side:
ABk+1=A(BBk)
Using the commutative property AB=BA and the inductive hypothesis ABk=BkA, we get:
ABk+1=(AB)Bk=(BA)Bk=B(ABk)=B(BkA)=Bk+1A
Thus, by the principle of mathematical induction, we conclude that for all n≥1:
ABn=BnA
This concludes the proof using mathematical induction.
More of these properties
For commutative matrices A and B:
(AB)n=AnBn
(A+B)2=A2+2AB+B2
(A−B)2=A2−2AB+B2
(A+B)3=A3+3A2B+3AB2+B3
(A+B)(A−B)=A2−B2
Binomial Theorem for Matrices:
The Binomial Theorem for matrices is an extension of the binomial expansion for real numbers. For any square matrices A and B that commute:
(A+B)n=k=0∑n(kn)An−kBk
Here, (kn) denotes the binomial coefficient, and the theorem expands (A+B)n into a sum of terms, each involving products of powers of A and B.
Example: For n=3, the expansion is:
(A+B)3=(03)A3B0+(13)A2B+(23)AB2+(33)B3
Simplifying with the binomial coefficients:
(A+B)3=A3+3A2B+3AB2+B3
Examples of Commutative Matrices
A classic example of commutative matrices involves the identity matrix I and any square matrix A. The identity matrix I commutes with any square matrix A, meaning that AI=IA=A. This commutative relationship allows us to apply algebraic identities similar to those used for real numbers.
For instance, consider the expression (I+A)2. We can expand this using the distributive property, keeping in mind that A commutes with I:
(I+A)2=(I+A)(I+A)=I2+IA+AI+A2
Since I2=I, and IA=AI=A, this simplifies to:
(I+A)2=I+2A+A2
Similarly, for the cube of the sum, (I+A)3, we expand:
(I+A)3=(I+A)(I+A)2
Substituting the earlier expansion:
(I+A)3=(I+A)(I+2A+A2)
Expanding further, we get:
(I+A)3=I+3A+3A2+A3
Another useful identity involving commutative matrices is I−A2=(I+A)(I−A). This identity holds because:
(I+A)(I−A)=I2−A2=I−A2
Finally, we can generalize these results using the binomial theorem for matrices. For any natural number n, the binomial expansion of (I+A)n is:
(I+A)n=k=0∑n(kn)In−kAk
Given that Im=I for any positive integer m, this simplifies to:
(I+A)n=k=0∑n(kn)Ak
Explicitly, the expansion is:
(I+A)n=(0n)I+(1n)A+(2n)A2+⋯+(nn)An
We will see many other matrices later on that commute with each other.
The transpose of a matrix is an operation that involves interchanging the rows and columns of the matrix. If you have a matrix A, its transpose is denoted by A⊤ or AT.
Definition:
Given a matrix A=[aij] of dimensions m×n (where m is the number of rows and n is the number of columns), the transpose of A, denoted as A⊤, is an n×m matrix obtained by interchanging the rows and columns of A. The elements of A⊤ are given by:
(A⊤)ij=aji
This means that the element in the i-th row and j-th column of A becomes the element in the j-th row and i-th column of A⊤. In other words, the (i,j)-th element of A⊤ corresponds to the (j,i)-th element of A.
Example:
Consider the matrix A:
A=[142536]
This is a 2×3 matrix (2 rows, 3 columns). The transpose of A, denoted A⊤, is:
A⊤=123456
In this example, the element (1,2) in A, which is a12=2, becomes the element (2,1) in A⊤, and the element (2,3) in A, which is a23=6, becomes the element (3,2) in A⊤. This operation demonstrates how rows and columns are interchanged to produce the transpose of the matrix.
Properties of the Transpose of a Matrix
The transpose of a matrix has several important properties that are frequently used in linear algebra. Below are some of the key properties:
1. Double Transpose:
The double transpose of a matrix returns the original matrix. This means that if you transpose a matrix twice, you end up with the same matrix you started with:
(A⊤)⊤=A
2. Transpose of a Scalar Multiple:
When a matrix is multiplied by a scalar k, the transpose of this product is equal to the scalar multiplied by the transpose of the matrix:
(kA)⊤=kA⊤
3. Transpose of a Sum:
The transpose of the sum of two matrices is equal to the sum of their transposes. This property ensures that transposition distributes over matrix addition:
(A+B)⊤=A⊤+B⊤
4. Transpose of a Product:
The transpose of the product of two matrices reverses the order of multiplication. This means that when transposing a product of matrices, the order of the matrices must be reversed:
(AB)⊤=B⊤A⊤
5. Transpose Reversal Law for the Product of Three Matrices
The reversal law for the transpose is applicable to the product of three matrices. If A is an m×p matrix, B is a p×q matrix, and C is a q×n matrix, then:
(ABC)⊤=C⊤B⊤A⊤
Explanation:
We can prove this step by step:
(ABC)⊤=((AB)C)⊤=C⊤(AB)⊤
Next, apply the reversal law to the product (AB)⊤:
C⊤(AB)⊤=C⊤(B⊤A⊤)=C⊤B⊤A⊤
Thus, the transpose of the product of three matrices A, B, and C is the product of their transposes in reverse order.
6. Transpose Reversal Law for the Product of Multiple Matrices
The reversal law can be generalized to the product of any number of matrices. If A1,A2,…,An are matrices, then:
(A1A2⋯An)⊤=An⊤⋯A2⊤A1⊤
This property shows that when taking the transpose of a product of multiple matrices, you reverse the order of the matrices and take the transpose of each one.
7. Transpose of a Power of a Matrix
The transpose of a power of a matrix is equal to the power of the transpose of the matrix. Specifically, for a square matrix A and a natural number n:
(An)⊤=(A⊤)n
This means that if you raise a matrix to a power and then transpose the result, it's the same as transposing the matrix first and then raising it to that power. To prove this use put take A1=A2=...=An=A in the previous property.
The trace of a square matrix is defined as the sum of its diagonal elements. If A=[aij] is an n×n square matrix, then the trace of A, denoted by trace(A) or tr(A), is given by:
trace(A)=i=1∑naii
This means that the trace is the sum of all elements aii where the row index i is equal to the column index i.
In other words, for a matrix A=[aij]n×n, the trace is calculated as:
trace(A)=a11+a22+⋯+ann=i=1∑naii
The trace is only defined for square matrices, as it specifically involves the sum of elements along the main diagonal.
Properties of the Trace of a Matrix
The trace of a matrix has several important properties:
Trace of the Identity Matrix:
trace(In)=n
The trace of the identity matrix In of order n is equal to n, since all the diagonal elements are 1.
Trace of a Transpose:
trace(A⊤)=trace(A)
The trace of a matrix is equal to the trace of its transpose, as the diagonal elements remain the same.
Trace of a Scalar Multiple:
trace(kA)=ktrace(A)
The trace of a scalar multiple of a matrix is the scalar multiplied by the trace of the matrix.
Trace of a Sum:
trace(A+B)=trace(A)+trace(B)
The trace of the sum of two matrices is equal to the sum of their traces.
Trace of a Product:
If A is m×n and B is n×m, then both AB and BA exist and have dimensions m×m and n×n, respectively. In that case, trace(AB)=trace(BA).
For matrices A of dimensions m×p, B of dimensions p×p, and C of dimensions p×n, the trace function exhibits a cyclic permutation property:
trace(ABC)=trace(CAB)=trace(BCA)
To prove this property, we use the fact that trace(XY)=trace(YX).
Starting with trace(ABC), we can group the first two matrices to write it as trace((AB)C). Applying the property trace(XY)=trace(YX), this becomes trace(C(AB)). By the associative property of matrix multiplication, this simplifies to trace(CAB).
Similarly, we can cyclically permute the matrices further:
trace(CAB)=trace((CA)B)=trace(B(CA))=trace(BCA)
Thus, we have shown that:
trace(ABC)=trace(CAB)=trace(BCA)
This proves that the trace of the product of matrices A, B, and C remains invariant under cyclic permutations.
Cyclic Property of the Trace for Multiple Matrices
The cyclic property of the trace extends to any number of matrices. For matrices A1,A2,…,An where A1 is m×p1, A2 is p1×p2, A3 is p2×p3, and so on, up to An being pn−1×m, the trace of their product has the following property:
For any matrix A of dimensions m×n, the trace of the products AA⊤ and A⊤A is equal to the sum of the squares of all elements of A:
trace(AA⊤)=trace(A⊤A)=i=1∑mj=1∑naij2
Proof:
Given A is m×n, the transpose A⊤ is n×m. Therefore, the matrices AA⊤ and A⊤A are both square, with dimensions m×m and n×n respectively. Since both are square matrices, their traces are defined.
Using the property of trace that trace(XY)=trace(YX), we can establish that:
trace(AA⊤)=trace(A⊤A).
To understand why these traces are also the sum of the squares of all elements in A, consider the definition of the trace of AA⊤: