Just like vectors, you can add and subtract matrices.
The process is similar.
For both of these operations, the matrices must be of the same size. That is, if we
want to add two matrices A and B, they both have to be of size mรn.
The same is true for subtraction.
Addition
The way addition is defined for two matrices of size mรn is as follows:
For each row i and each column j:
[A+B]ijโ=[A]ijโ+[B]ijโ.
That means that you must add each element at position ij of matrix A with the
corresponding element at position ij of matrix B. That gives you the element of the
resulting matrix at position ij.
Another way of expressing this, which might make it more clear:
Because of its definition in terms of scalar addition,
matrix addition inherits its algebraic properties.
Commutative Property
For two matrices A and B, the order of the operands does not make a difference:
A+B=B+A.
Associative Property
For three matrices A, B, and C:
(A+B)+C=A+(B+C).
Closure Property
If A and B are both mรn matrices, then A+B is also an mรn matrix.
Additive Identity
For some matrix A of size mรn, if 0mรnโ is the zero matrix
(just like the zero vector,
it is a matrix consisting of all 0) of size mรn:
A+0mรnโ=A.
Additive Inverse
If A is a matrix of size mรn:
AโA=0mรnโ.
Properties of Matrix Subtraction
Just like with matrix addition, matrix subtraction inherits all the properties from
scalar subtraction. That means itโs non-commutative and non-associative.
That means that generally,