方阵的主对角线可以在Wolfram语言使用Tr公司[米,列表].
埃里克·魏斯坦(Eric W.Weisstein)。“主对角线”自数学世界--Wolfram Web资源。https://mathworld.wolfram.com/MainDiagonal.html