在数学里,矩阵加法一般是指两个矩阵把其相对应元素加在一起的运算。但有另一运算也可以认为是一种矩阵的加法。 个别元素相加(减) 通常的矩阵加法被定义在两个相同大小的矩阵。两个m×n矩阵A和B的和,标记为A+B,一样是个m×n矩阵,其内的各元素为其相对应元素相加后的值。例如: [ 1 3 1 0 1 2 ] + [ 0 0 7 5 2 1 ] = [ 1 + 0 3 + 0 1 + 7 0 + 5 1 + 2 2 + 1 ] = [ 1 3 8 5 3 3 ] {\displaystyle {\begin{bmatrix}1&3\\1&0\\1&2\end{bmatrix}}+{\begin{bmatrix}0&0\\7&5\\2&1\end{bmatrix}}={\begin{bmatrix}1+0&3+0\\1+7&0+5\\1+2&2+1\end{bmatrix}}={\begin{bmatrix}1&3\\8&5\\3&3\end{bmatrix}}} 也可以做矩阵的减法,只要其大小相同的话。A-B内的各元素为其相对应元素相减后的值,且此矩阵会和A、B有相同大小。例如: [ 1 3 1 0 1 2 ] − [ 0 0 7 5 2 1 ] = [ 1 − 0 3 − 0 1 − 7 0 − 5 1 − 2 2 − 1 ] = [ 1 3 − 6 − 5 − 1 1 ] {\displaystyle {\begin{bmatrix}1&3\\1&0\\1&2\end{bmatrix}}-{\begin{bmatrix}0&0\\7&5\\2&1\end{bmatrix}}={\begin{bmatrix}1-0&3-0\\1-7&0-5\\1-2&2-1\end{bmatrix}}={\begin{bmatrix}1&3\\-6&-5\\-1&1\end{bmatrix}}} 直和 另一种运算为直和。直和可以由任何一对矩阵形成,其定义为: A ⊕ B = [ A 0 0 B ] = [ a 11 ⋯ a 1 n 0 ⋯ 0 ⋮ ⋱ ⋮ ⋮ ⋱ ⋮ a m 1 ⋯ a m n 0 ⋯ 0 0 ⋯ 0 b 11 ⋯ b 1 q ⋮ ⋱ ⋮ ⋮ ⋱ ⋮ 0 ⋯ 0 b p 1 ⋯ b p q ] {\displaystyle A\oplus B={\begin{bmatrix}A&0\\0&B\end{bmatrix}}={\begin{bmatrix}a_{11}&\cdots &a_{1n}&0&\cdots &0\\\vdots &\ddots &\vdots &\vdots &\ddots &\vdots \\a_{m1}&\cdots &a_{mn}&0&\cdots &0\\0&\cdots &0&b_{11}&\cdots &b_{1q}\\\vdots &\ddots &\vdots &\vdots &\ddots &\vdots \\0&\cdots &0&b_{p1}&\cdots &b_{pq}\end{bmatrix}}} 举例来说: [ 1 3 2 2 3 1 ] ⊕ [ 1 6 0 1 ] = [ 1 3 2 0 0 2 3 1 0 0 0 0 0 1 6 0 0 0 0 1 ] {\displaystyle {\begin{bmatrix}1&3&2\\2&3&1\end{bmatrix}}\oplus {\begin{bmatrix}1&6\\0&1\end{bmatrix}}={\begin{bmatrix}1&3&2&0&0\\2&3&1&0&0\\0&0&0&1&6\\0&0&0&0&1\end{bmatrix}}} 注意到这种运算可以给两个图的邻接矩阵取并集。 在任两个向量空间内取定基底,并取两基底的联集为向量空间直和的基底,则两空间上的线性变换的直和可以表成两矩阵的直和。 一般地,n个矩阵的直和可以写成: ⨁ i = 1 n A i = diag ( A 1 , A 2 , A 3 , … , A n ) = [ A 1 A 2 ⋱ A n ] . {\displaystyle \bigoplus _{i=1}^{n}A_{i}={\mbox{diag}}(A_{1},A_{2},A_{3},\ldots ,A_{n})={\begin{bmatrix}A_{1}&&&\\&A_{2}&&\\&&\ddots &\\&&&A_{n}\end{bmatrix}}.} 另见 矩阵乘法 外部链接 Online matrix addition calculator (页面存档备份,存于互联网档案馆) Wikiwand - on Seamless Wikipedia browsing. On steroids.