Matrices
Definition. A π Γ π size matrix π¨ is a rectangular array of π β π real (or
complex) numbers arranged in π horizontal rows and π vertical columns
π΄ =
[
π11 π12β― π1π β¦π1π
π21 π22β― π2π β¦π2π
β¦β¦β¦β¦β¦β¦β¦β¦ . .ππ1 ππ2β― πππ β¦πππ β¦β¦β¦β¦β¦β¦β¦ . .
ππ1 ππ2β― πππ β¦πππ]
π π‘β πππ€ (1)
j th column
We shall say that π΄ is π by π (written π Γ π ). If π = π, we say that π΄ is
a square matrix of order π and the numbers π11 , π22, β¦ , πππ are elements of
the main diagonal of π΄. We refer to the πππ, as π, π th element of π΄ and we
often write (1) as
π΄ = [πππ].
Example 1. Let π΄ = [ 1 2 3β1 0 1
], π΅ = [1 42 β3
], πΆ = [ 1β1 2
], π· = [1 1 02 0 13 β1 2
].
Then π΄ is a 2 Γ 3 matrix with
π11 = 1 π12 = 2 π13=3
π21 = β1 π22 = 0 π23=1;
π΅ is a 2 Γ 2 matrix with
π11 = 1 π12 = 4
π21 = 2 π22 = β3 ;
πΆ is a 3 Γ 1 matrix; π· is a 3 Γ 3 matrix. In π·, the elements π11 =
1, π22 = 0, π33 = 2 form the main diagonal.
Any 1 Γ π size matrix is called row-vector, any π Γ 1 size matrix is called
column-vector or simply are called a π βvector.
Example 2. π’ = [1 2 β 1 0 ] is 4-vector and π£ = [ 1β1 3
] is 3-vector.
Definition. A square matrix π΄ = [πππ] for which every term off the main
diagonal is zero, that is πππ = 0 for π β π, is called diagonal matrix.
Example 3. πΊ = [ 4 0 0 1
], π» = [β3 0 00 β2 00 0 4
] are diagonal matrix.
Definition. A diagonal matrix π΄ = [πππ] for which πππ = π for π = π and πππ = 0
for β π , is called a scalar matrix.
Example 4. The following are scalar matrices: J = [ β2 0 0 β 2
],
I3 = [1 0 00 1 00 0 1
] .
Definition. Two π Γ π matrix π΄ = [πππ] and π΅ = [πππ] are said to be equal if
πππ = πππ , that is if corresponding elements are equal.
Example 5. The matrices: A = [1 2 β12 β3 40 β4 5
] and B = [1 2 π€2 π₯ 4π¦ β4 π§
] are
equal if π€ = β1, π₯ = β3, π¦ = 0 πππ π§ = 5.
Definition. If π΄ = [πππ] and π΅ = [πππ] are π Γ π matrices, then the sum of π΄
and π΅ is the π Γ π matrix πΆ = [πππ] , defined by
πππ = πππ + πππ .
That is, C is obtained by adding the corresponding elements of A and B.
Example 6. Let π΄ = [ 1 β 2 42 β 1 3
] and π΅ = [ 0 2 β 41 3 1
].
Then π΄ + π΅ = [ 1 + 0 β 2 + 2 4 + (β4)2 + 1 β 1 + 3 3 + 1
] = [1 0 0 3 2 4
].
Definition. If π΄ = [πππ] is π Γ π matrix and π is real number, then the scalar
multiple of π΄ by π , ππ΄, is π Γ π matrix π΅ = [πππ], where πππ = ππππ.
That is π΅ obtained by multiplying each element of π΄ by π.
If π΄ = [πππ] and π΅ = [πππ] are π Γ π matrices, we write π΄ + (β1)π΅ as π΄ β π΅
and call this the difference of π΄ and π΅.
Example 7. Let π΄ = [ 2 3 β 54 2 1
] and π΅ = [2 β 1 33 5 β 2
].
Then π΄ β π΅ = [2 β 2 3 + 1 β 5 β 34 β 3 2 β 5 1 + 2
] = [0 4 β 81 β 3 3
].
Definition. If π΄ = [πππ] is π Γ π matrix, then π Γ π matrix π΄π = [ππππ], where
ππππ = πππ
is called the transpose of π΄.
Thus, the entries in each row of π΄π are the entries in the corresponding column
of π΄.
Example 8. Let π΄ = [4 β 2 0 0 5 β 2
] then π΄π = [4 0
β2 50 β2
],
π· = [3 β5 1] then π·π = [3
β51
].
Definition. If π΄ = [πππ] is an π Γ π matrix and π΅ = [πππ] is π Γ π matrix, then
the product of π΄ and π΅, denoted π΄π΅, is the π Γ π matrix πΆ = [πππ], defined
by
πππ = ππ1π1π + ππ2π2π + β―+ ππππππ = β ππππππππ=1 .
j th column
π π‘β πππ€
[ π11 π12β― β¦β¦ . π1π
π21 π22 β¦ β¦π2π
β¦β¦β¦β¦β¦β¦β¦β¦ . .ππ1 ππ2β― β¦β¦πππ β¦β¦β¦β¦β¦β¦β¦ . .ππ1 ππ2β― β¦πππ ]
[ π11 π12 β¦π1π β¦π1π
π21 π22 β¦π2π β¦π2π
β¦β¦β¦β¦β¦β¦β¦β¦ . .β¦β¦β¦β¦β¦β¦β¦β¦ . .β¦β¦β¦β¦β¦β¦β¦ . .
ππ1 ππ2 β¦πππ β¦πππ]
=
[
π11 β¦β¦β¦ π1π
β¦β¦β¦β¦ β¦ππ1 β¦β¦πππ β¦πππ
β¦β¦β¦β¦β¦β¦β¦ππ1 β¦β¦πππ β¦πππ]
Example 9. Let π΄ = [1 2 β 13 1 4
] and π΅ = [β2 54 β32 1
]. Then
π΄π΅ = [1 2 β 13 1 4
] [β2 54 β32 1
] =
[1 β (β2) + 2 β 4 + (β1) β 2 1 β 5 + 2 β (β3) + (β1) β 1
3 β (β2) + 1 β 4 + 4 β 2 3 β 5 + 1 β (β3) + 4 β 1]=[
4 β26 16
]
The Matrix Multiplication Is Not Commutative
Matrix multiplication is a noncommutative operationβi.e., it is possible
for AB = BA, even when both products exist and have the same shape.
Example 10. Let π΄ = [1 2
β1 3] and π΅ = [
2 10 1
]. Then π΄π΅ = [2 3
β2 2] and
π΅π΄ = [2 10 1
] [1 2
β1 3] = [
1 7β1 3
].
Thus π΄π΅ β π΅π΄.