18.3 Matrix algebra 505
18.3 Matrix algebra
Equality of matrices
Two matrices,A 1 = 1 (a
ij)andB 1 = 1 (b
ij), are equal if they have the same dimensions (the
same number of rows and the same number of columns), and if the corresponding
elements are equal:
(a
ij) 1 = 1 (b
ij)ifa
ij1 = 1 b
ijfor all i, j (18.20)
EXAMPLE 18.4Equality of matrices
If
then A 1 = 1 Bifa
111 = 1 1,a
121 = 1 2,a
131 = 1 0,a
211 = 1 −3,a
221 = 1 4,a
231 = 1 2.
Addition of matrices
The sum of two matrices is defined only when the matrices have the same dimensions.
IfA 1 = 1 (a
ij)andB 1 = 1 (b
ij)are bothm 1 × 1 nmatrices, their sum is anm 1 × 1 nmatrix obtained
by adding the corresponding elements of Aand B:
A 1 + 1 B 1 = 1 (a
ij1 + 1 b
ij) (18.21)
EXAMPLES 18.5Addition of matrices
0 Exercises 13–18
Multiplication of a matrix by a scalar
The product of anm 1 × 1 nmatrixA 1 = 1 (a
ij)and a scalar (number) cis them 1 × 1 nmatrix
whose elements are obtained by multiplying each element of Aby c:
cA 1 = 1 (ca
ij) (18.22)
a
a
a
b
b
b
123123=
ab
ab
ab
112233()()( )123 312 215−+− =−−
123
456
120
301
203
755
−
−
=
AB==
−
aaa
aaa
11
12 1321 22 23120
34
and
22