Chap 2
Chap 2
Chap 2
March 8, 2020
1 2.1 Matrix Addition, Scalar Multiplication, and Transposition
Matrix
A matrix of size m × n is rectangular array of numbers with m
rows, n columns.
The (i, j)-entry of a matrix is the number lying in row i and
column j.
If A is an m × n matrix and the (i, j)-entry of A is aij , then A
is written as follow:
a11 a12 . . . a1n
a21 a22 . . . a2n
A= .. .. or A = [aij ]m×n
..
. . .
am1 am2 . . . amn
3/52
Square Matrix, Zero Matrix, Negative Matrix
A matrix of size n × n is called a square matrix of order n.
The m × n matrix in which every entry is zero is called the
zero matrix, denoted as 0.
If A = [aij ]m×n , then the negative matrix of A ( written –A) is
defined by
−A = [−aij ]m×n
Equality of Matrices
Two matrices A and B are called equal ( written A = B ) if
(1) they have the same size,
(2) corresponding entries are equal.
Example 1.
" # " #
a b 1 −2
= ⇔ a = 1, b = −2, c = 3, d = 4.
c d 3 4
Matrix Addition and Subtraction
If A = [aij ]m×n , B = [bij ]m×n , then
the sum of A and B, denoted A + B, is defined by
Example 2.
" # " #
1 2 −3 2 −1 3
Let A = , B= .
0 4 −1 5 2 −2
Compute A + B, A − B.
Properties of Matrix Addition
If A, B, C are any matrices of the same size, then
(1) A + B = B + A (commutative law)
(2) A + (B + C ) = (A + B) + C (associative law)
(3) 0 + A = A
(4) A + (−A) = 0
Scalar Multiplication
If A = [aij ]m×n and k is any number, then the scalar multiple kA is
defined by
kA = [kaij ]m×n
Vectors
An ordered sequence (a1 , a2 , . . . , an ) of real numbers is called
an ordered n-tuple.
Rn denotes the set of all ordered n-tuples of real numbers.
a = (a1 , a2 , . . . , an ) ∈ Rn is called a vector (or an n-vector)
and is also written as
a1
a2
a= ..
.
an
13/52
The Dot Product
The dot
product of a row R = [r1 r2 . . . rn ] and a column
c1
c2
C = .. is the number r1 c1 + r2 c2 + . . . + rn cn .
.
cn
Matrix-Vector Products
Let A be an m × n matrix and let x be an n-vector. Then the
product Ax is an m-vector whose ith entry is the dot product of
the ith row of A with x.
Example 7.
2
2 −1 3 5
1
Let A = 0 2 −3 1 , x = . Compute Ax.
0
−3 4 1 2
−2
Matrix Form of a System of Linear Equations
Consider the system of linear equations
a11 a12 ... a1n x1 b1
a21 a22 ... a2n x2 b2
If A =
.. .. , X = .. , and b = .. ,
..
. . . . .
am1 am2 . . . amn xn bm
AX = b
Example 8. Solve the homogeneous system AX = 0, where
1 −1 −1 3
A = 2 −1 −3 4
1 0 −2 1
x1 = 2s − t, x2 = s + 2t, x3 = s, x4 = t,
x1 + 2x2 − x3 + 2x4 + x5 = 0
x1 + 2x2 + 2x3 + x5 = 0
2x1 + 4x2 − 2x3 + 3x4 + x5 = 0
Solution:
The reduction of the augmented matrix to reduced row-echelon
form is
1 2 −1 2 1 0 1 2 −1 2 1 0
R2 → R2 − R1
1 2 2 0 1 0 0 0 3 −2 0 0
R3 → R3 − 2R1
2 4 −2 3 1 0 −− −−−−−−−−→ 0 0 0 −1 −1 0
1 2 −1 2 1 0
R2 → 13 R2 R1 → R1 − 2R3
0 0 1 −2/3 0 0
R3 → −R3 R → R2 + 32 R3
−−−−−−−→ 0 0 0 1 1 0 −−2−−−−−
−−−−→
1 2 −1 0 −1 0 1 2 0 0 −1/3 0
0 0 1 0 2/3 0 R1 → R1 + R2 0 0 1 0 2/3 0
−−−−−−−−−−→
0 0 0 1 1 0 0 0 0 1 1 0
leading variables: x1 , x3 , x4
nonleading variables:
x2 , x5 Let x2 = s, x5= t.
1 1
x1 + 2x2 − 3 x5 = 0 x1 = −2s + 3 t
The system ⇔ 2 ⇔ 2
x3 + x5 = 0 x3 = − t
3
x = −t 3
x4 + x5 = 0 4
T (x) = Ax, ∀x ∈ Rn .
Example 10. Let T : R2 → R2 be the reflection in the x axis.
" # " #
a1 a1
T is defined by T = .
a2 −a2
T is the matrix transformation induced by
" #
1 0
A=
0 −1
Example 11. Let Rθ : R2 → R2 denote counterclockwise rotation
about the origin through the angle θ.
Rθ is defined by
" # " #
a a cos θ − b sin θ
Rθ =
b a sin θ + b cos θ
" # " #
x ax
T is defined by T = .
y y
If a > 1, T is called an x-expansion of R2 .
If 0 < a < 1, T is called an x-compression of R2 .
Example 13. Let w be a fixed column in Rn , define the
transformation Tw : Rn → Rn by
Tw (x) = x + w , ∀x ∈ Rn .
Tw is called translation by w .
2.1 Matrix Addition, Scalar Multiplication, and Transposition
2.2 Equations, Matrices, and Transformations
2.3 Matrix Multiplication
2.4 Matrix Inverses
2.6 Linear Transformations
Matrix Multiplication
Let A and B be matrices of sizes m × n and n × k, respectively.
The product AB is an m × k matrix whose (i, j)-entry is the dot
product of the row i of A with column j of B.
28/52
Example 14.
" # 2 3 1
1 −1 2
Let A = , B = 1 9 7
2 0 4
−1 0 2
Compute the (1, 3)- and (2, 2)-entries of AB. Then compute AB.
Example 15. (25, page 68)
An autoparts manufacturer makes fenders, doors, and hoods. Each
requires assembly and packaging carried out at factories: Plant 1,
Plant 2, and Plant 3. Matrix A below gives the number of hours for
assembly and packaging, and matrix B gives the hourly rates at the
three plants. Explain the meaning of the (3, 2)-entry in the matrix
AB. Which plant is the most economical to operate? Give reasons.
Example 16.
" # " #
1 2 4 −1 6
Let A = ,B =
0 1 −1 1 0
Note
AB is defined only if the number of columns of A equals the
number of rows of B.
In general, AB 6= BA.
If AB = BA then A and B are said to commute.
Properties of Matrix Multiplication
Assume that k is an arbitrary scalar and A, B, C are matrices of
sizes such that the indicated operations can be performed.
1) A(BC ) = (AB)C
2) A(B + C ) = AB + AC , A(B–C ) = AB–AC
3) (B + C )A = BA + CA, (B–C )A = BA–CA
4) k(AB) = (kA)B = A(kB)
5) (AB)T = B T AT
Block Multiplication
If matrices A and B are partitioned compatibly into blocks, the
product AB can be computed by matrix multiplication using blocks
as entries.
" # " #
A11 A12 B11 B12
A= , B=
A21 A22 B21 B22
" #
A11 B11 + A12 B21 A11 B12 + A12 B22
⇒ AB =
A21 B11 + A22 B21 A21 B12 + A22 B22
Example 17. Compute AB, using the indicated block partitioning.
1 2
1 0 0 0 0 −2 4
0 1 0 0 0
A= , B = 3 0
1 9 7 9 −1
4 −3
1 2 3 4 5
5 6
Matrix Inverses
Identity Matrix
If A = [aij ]m×n , the elements a11 , a22 , a33 , . . . are called the
main diagonal of A.
The square matrix of order n with 1’s on the main diagonal
and zeros elsewhere is called the identity matrix of order n,
denoted In or I .
Example 19.
" 1 0 0
#
1 0
I2 = , I3 = 0 1 0
0 1
0 0 1
Example 20.
" #
0 −1
Let A = . Show that A3 = I and so find A−1 .
1 −1
# "
a b
The determinant detA of the matrix A = is defined by
c d
detA = ad − bc
X = A−1 b
Example 22.
1 −1 3
Given A−1 = 2 0 5. Solve the system of equations
−1 1 0
1
AX = −1
3
Matrix Inversion Algorithm
If A is an invertible n × n matrix, there exists a sequence of
elementary row operations that carry A to In . This same series of
row operations carries In to A−1 . The algorithm can be
summarized as follows:
[A | In ] → [In | A−1 ]
Linear Transformations
Definition
A transformation T : Rn → Rm is called a linear transformation if
it satisfies the following two conditions for all vectors X and Y in
Rn and all scalars a:
T1) T (X + Y ) = T (X ) + T (Y )
T2) T (aX ) = aT (X )
42/52
Theorem 3
If T : Rn → Rm is a linear transformation, then
T ◦ T 0 = T 0 ◦ T = 1Rn
1Rn (X ) = X , ∀X ∈ Rn
Theorem 6
Let T : Rn → Rn be a linear transformation with matrix A. Then
1) A is invertible if and only if T has an inverse.
2) In this case, T has exactly one inverse, denoted by T −1 , and
T −1 : Rn → Rn is the linear transformation with matrix A−1 .
Exercises
52/52