Math/Linear algebra

Diagonal and trace

데먕 2019. 10. 10. 21:36

1. Description

1.1 Diagonal

$$\boldsymbol{v}_{i}=A_{i,i},\: \: i=\left \{ 1,2,\cdots ,min(m,n) \right \}$$

1.2 Trace

The trace of an n × n square matrix A is defined as

$$tr(\boldsymbol{A})=\sum_{i=1}^{m}A_{i,i}=\sum_{i=1}^{n}a_{ii}=a_{11}+a_{11}+\cdots +a_{nn}$$

where aii denotes the entry on the ith row as well as ith column of A.

2. Example

2.1 Diagonal

$$diag\left ( \begin{pmatrix} 
1 & -1 & 8\\  
-1 & -2 & 4\\  
0 & 3 & 5 
\end{pmatrix} \right )=\begin{pmatrix}
1\\ 
-2\\ 
5
\end{pmatrix}$$

$$diag\left ( \begin{pmatrix} 
1 & -1\\  
-1 & -2\\  
0 & 3 
\end{pmatrix} \right )=\begin{pmatrix}
1\\ 
-2
\end{pmatrix}$$

2.2 Trace

$$trace\left ( \begin{pmatrix} 
1 & -1 & 8\\  
-1 & -2 & 4\\  
0 & 3 & 5 
\end{pmatrix} \right )=1+(-2)+5=4$$

3. References

https://en.wikipedia.org/wiki/Trace_(linear_algebra)

https://en.wikipedia.org/wiki/Diagonal_matrix

https://en.wikipedia.org/wiki/Diagonal#targetText=In%20geometry%2C%20a%20diagonal%20is,sloping%20line%20is%20called%20diagonal.