正在加载图片...
matrix A-AT is anti-symmetric.From this it follows that any square matrix A E R"x"can be represented as a sum of a symmetric matrix and an anti-symmetric matrix,since A=(A+4)+(A-AT) and the first matrix on the right is symmetric,while the second is anti-symmetric.It turns out that symmetric matrices occur a great deal in practice,and they have many nice properties which we will look at shortly.It is common to denote the set of all symmetric matrices of size n as S",so that A E S"means that A is a symmetric n x n matrix; 3.4 The Trace The trace of a square matrix A E Rnx",denoted tr(A)(or just trA if the parentheses are obviously implied),is the sum of diagonal elements in the matrix: trA As described in the CS229 lecture notes,the trace has the following properties (included here for the sake of completeness): ●ForA∈Rnxn,trA=trAT. ·ForA,B∈Rnxn,tr(A+B)=trA+trB. ·ForA∈Rmxn,t∈R,tr(tA)=ttrA. For A,B such that AB is square,trAB trBA For A,B,C such that ABC is square,trABC trBCA trCAB,and so on for the product of more matrices. As an example of how these properties can be proven,we'll consider the fourth property given above.Suppose that A E Rmxn and B E Rnxm (so that AB E Rmxm is a square matrix).Observe that BA E Rnxn is also a square matrix,so it makes sense to apply the trace operator to it.To verify that trAB =trBA,note that =(三)B4防=BM 9matrix A−AT is anti-symmetric. From this it follows that any square matrix A ∈ R n×n can be represented as a sum of a symmetric matrix and an anti-symmetric matrix, since A = 1 2 (A + A T ) + 1 2 (A − A T ) and the first matrix on the right is symmetric, while the second is anti-symmetric. It turns out that symmetric matrices occur a great deal in practice, and they have many nice properties which we will look at shortly. It is common to denote the set of all symmetric matrices of size n as S n , so that A ∈ S n means that A is a symmetric n × n matrix; 3.4 The Trace The trace of a square matrix A ∈ R n×n , denoted tr(A) (or just trA if the parentheses are obviously implied), is the sum of diagonal elements in the matrix: trA = Xn i=1 Aii. As described in the CS229 lecture notes, the trace has the following properties (included here for the sake of completeness): • For A ∈ R n×n , trA = trAT . • For A, B ∈ R n×n , tr(A + B) = trA + trB. • For A ∈ R n×n , t ∈ R, tr(tA) = t trA. • For A, B such that AB is square, trAB = trBA. • For A, B, C such that ABC is square, trABC = trBCA = trCAB, and so on for the product of more matrices. As an example of how these properties can be proven, we’ll consider the fourth property given above. Suppose that A ∈ R m×n and B ∈ R n×m (so that AB ∈ R m×m is a square matrix). Observe that BA ∈ R n×n is also a square matrix, so it makes sense to apply the trace operator to it. To verify that trAB = trBA, note that trAB = Xm i=1 (AB)ii = Xm i=1 Xn j=1 AijBji! = Xm i=1 Xn j=1 AijBji = Xn j=1 Xm i=1 BjiAij = Xn j=1 Xm i=1 BjiAij! = Xn j=1 (BA)jj = trBA. 9
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有