在線性代數中,一個矩陣 A 的主對角線是收集所有 A_{ij}滿足 i=j。例如,以下矩陣中,紅色的1的元素就位在主對角線上:
:\begin{bmatrix}
\color{red}1 & 0 & 0\\
0 & \color{red}1 & 0\\
0 & 0 & \color{red}1\end{bmatrix}\begin{bmatrix}
\color{red}1 & 0 & 0\\
0 & \color{red}1 & 0\\
0 & 0 & \color{red}1\\
0 & 0 & 0\end{bmatrix} \begin{bmatrix}
\color{red}1 & 0 & 0 & 0\\
0 & \color{red}1 & 0 & 0\\
0 & 0 & \color{red}1 & 0\end{bmatrix}
如果一個矩陣的主對角線以外的元素全為 0,這樣的矩陣就稱作對角矩陣。而主對角線元素的和,即為矩陣的跡數。
反對角線
另一種對角線則稱作反對角線、反向對角線或次對角線。
一個 n\times n方塊矩陣 B 的反對角線則是收集所有 B_{ij}滿足 i+j = n+1。也就是從右上角到左下角的對角線。
\begin{bmatrix}
0 & 0 & \color{red}{1}\\
0 & \color{red}{1} & 0\\
\color{red}{1} & 0 & 0\end{bmatrix}
參見
- 對角矩陣
- 跡
參考資料
*
评论 (0)