3.4 Operations on Matrices
Matrices are not just static arrays of numbers; they can be combined and transformed. This section introduces the fundamental operations on matrices — addition, subtraction, scalar multiplication, and multiplication — each with rules arising from the structure of matrices themselves.
3.4.1 Addition of Matrices
Addition is defined only when the two matrices are of the same order.
Definition (Addition of Matrices)
If A=[aij]m×n and B=[bij]m×n are of the same order m×n, then their sum is the matrix C=[cij]m×n with
cij=aij+bijfor all i=1,…,m, j=1,…,n.
That is, add the entries in the same row and column.
Example
For A=[215−3] and B=[40−17] (both 2×2),
A+B=[2+41+05+(−1)−3+7]=[6144].
You cannot add a 2×3 matrix to a 2×2 matrix. The orders must match exactly; otherwise the sum is undefined.
3.4.2 Multiplication of a Matrix by a Scalar
A scalar is a real number. Multiplying a matrix by a scalar means multiplying every entry by that scalar.
Definition (Scalar Multiplication)
If A=[aij]m×n and k is a scalar, then kA=[bij]m×n where
bij=k⋅aijfor all i,j.
Example
For A=[30−25] and k=−2,
kA=[(−2)(3)(−2)(0)(−2)(−2)(−2)(5)]=[−604−10].
3.4.3 Properties of Matrix Addition and Scalar Multiplication
The following hold for any matrices A, B, C of the same order m×n and any scalars k, l. They let us manipulate matrix equations like ordinary equations.
Property (I): Commutativity of Addition A+B=B+A
Proof. (A+B)ij=aij+bij=bij+aij=(B+A)ij for every entry. □
Property (II): Associativity of Addition (A+B)+C=A+(B+C)
Proof. ((A+B)+C)ij=(aij+bij)+cij=aij+(bij+cij)=(A+(B+C))ij, since real-number addition is associative. □
Property (III): Additive Identity (Zero Matrix) There is a zero matrix O of order m×n with A+O=A=O+A.
Proof. (A+O)ij=aij+0=aij; the other equality follows by commutativity. □
Property (IV): Additive Inverse For every A=[aij] there is −A=[−aij] with A+(−A)=O=(−A)+A.
Proof. (A+(−A))ij=aij+(−aij)=0. □
Property (V): Distributivity over Matrix Addition k(A+B)=kA+kB
Proof. (k(A+B))ij=k(aij+bij)=kaij+kbij=(kA+kB)ij. □
Property (VI): Distributivity over Scalar Addition (k+l)A=kA+lA
Proof. ((k+l)A)ij=(k+l)aij=kaij+laij=(kA+lA)ij. □
Property (VII): Associativity of Scalar Multiplication k(lA)=(kl)A
Proof. (k(lA))ij=k(laij)=(kl)aij=((kl)A)ij. □
Property (VIII): Multiplication by 1 1⋅A=A
Proof. (1⋅A)ij=1⋅aij=aij. □
3.4.4 Difference of Matrices
Definition (Difference of Matrices)
If A and B are of the same order m×n, their difference is
A−B=A+(−B),(A−B)ij=aij−bij.
Example
For A=[5−132] and B=[247−3],
A−B=[5−2−1−43−72−(−3)]=[3−5−45].
3.4.5 Multiplication of Matrices
Matrix multiplication is not defined entry-wise; it corresponds to composition of linear transformations.
Definition (Multiplication of Matrices)
Let A=[aij] be m×n and B=[bjk] be n×p. The product AB is the m×p matrix C=[cik] whose entry cik is the dot product of the i-th row of A with the k-th column of B:
cik=∑j=1naijbjk=ai1b1k+ai2b2k+⋯+ainbnk.
For AB to be defined, the number of columns of A must equal the number of rows of B. If A is m×n and B is n×p, then AB is m×p.
Example
Let A=[1324] (2×2) and B=[5869710] (2×3). Since A has 2 columns and B has 2 rows, AB is defined and is 2×3. Taking each row of A against each column of B:
c11c21=1(5)+2(8)=21,=3(5)+4(8)=47,c12c22=1(6)+2(9)=24,=3(6)+4(9)=54,c13c23=1(7)+2(10)=27,=3(7)+4(10)=61.
AB=[214724542761].
Here BA is not defined, since B is 2×3 and A is 2×2 (columns of B = 3 ≠ 2 = rows of A). Matrix multiplication is not commutative.
3.4.6 Properties of Matrix Multiplication
Property (IX): Associativity If A is m×n, B is n×p, C is p×q, then (AB)C=A(BC).
Proof. The (i,l) entry of (AB)C is ∑k=1p(∑j=1naijbjk)ckl=∑k∑jaijbjkckl, and that of A(BC) is ∑j=1naij(∑k=1pbjkckl)=∑j∑kaijbjkckl. The double sums agree. □
Property (X): Distributivity over Addition A(B+C)=AB+AC and (A+B)C=AC+BC (for conformable orders).
Proof (first part). The (i,k) entry of A(B+C) is ∑jaij(bjk+cjk)=∑jaijbjk+∑jaijcjk=(AB)ik+(AC)ik. The second part is similar. □ …