Professional Documents
Culture Documents
Lectures in Math 111: Linear Algebra Lecture 1. The Inverse of A Matrix
Lectures in Math 111: Linear Algebra Lecture 1. The Inverse of A Matrix
1 d -b
-1
A =
ad – bc -c a .
1
AA-1 = I2
1 1 a b 1 0
=
3 4 c d 0 1
a + c b + d 1 0
=
3a + 4c 3b + 4d 0 1
Equating Elements
a + c = 1 (1)
3a + 4c = 0 (2)
b + d = 0 (3)
3b + 4d = 1 (4)
= -3 1
Solution 2: By using
1 d -b
-1
A =
ad – bc -c a .
a = 1
b = 1
c = 3
d = 4
1 4 -1
-1
A
1(4) – 1(3) -3 1
=
1 4 -1
=
4 – 3 -3 1
1 4 -1
=
1 -3 1
4 -1
= 1
-3 1
4 -1
A -1
1 1 : 1 0
3 4 : 0 1
- 3R1 + R2 R2
1 1 : 1 0
0 1 : -3 1
- R2 + R1 R1
1 0 : 4 -1
0 1 : -3 1
4 -1
A-1
= -3 1
a b
Let A-1
= c d
AA-1 = I2
-1 -3 a b 1 0
=
3 9 c d 0 1
-a – 3c -b – 3d 1 0
=
3a + 9c 3b + 9d 0 1
Equating elements:
-a – 3c = 1 (1)
3a + 9c = 0 (2)
-b – 3d = 0 (3)
3b + 9d = 1 (4)
0 3
Combine equations (3) and (4)
Multiply 3 to equation (3)
- 3b – 9d = 0 (3)
(+) 3b + 9d = 1 (4)
0 1
Solution 2: By using
1 d -b
-1
A =
ad – bc -c a .
a = -1
b = -3
c = 3
d = 9
1 9 3
-1
A
(-1)(9) – (-3)(3) -3 -1
=
1 9 3
=
-9 + -3 -1
9
1 9 3
=
0 -3 -1
3 9 : 0 1
- R1 R1
1 3 : -1 0
3 9 : 0 1
- 3R1 + R2 R2
1 3 : -1 0
0 0 : 3 1
The reduced row echelon form cannot be of the form [In : A-1]. Then A-1 does not
exist. Hence, A is a singular matrix or noninvertible.
1 0 5
A = 1 1 1
0 1 -4 .
a b c
Let A-1 = d e f
g h i
AA-1 = I3
1 0 5 a b c 1 0 0
1 1 1 d e f = 0 1 0
0 1 -4 g h i 0 0 1
1 0 0
= 0 1 0
0 0 1
a + 5g b + 5h c + 5i 1 0 0
a+d+g b + e+ h c+f+i = 0 1 0
d – 4g e – 4h f – 4i 0 0 1
Equating Elements
a + 5g = 1 (1) b + 5h = 0 (4)
a +d+g = 0 (2) b + e + h = 1 (5)
d – 4g = 0 (3) , e – 4h = 0 (6), and
c + 5i = 0 (7)
c + f + i = 0 (8)
f – 4i = 1 (9).
-d + 4g = 1 (10)
Combine equations (3) and (10)
d – 4g = 0 (3)
(+) - d + 4g = 1 (10)
0 1
-e + 4h = -1 (11)
0 -1
-f + 4i = 0 (12)
0 1
1 -1 3
A = 3 0 2
4 1 0
1 2
B =
3 1
1 1 2
C = 5 3 1
1 1 1
2. If 2 1
-1
A =
3 3 , then find A.
3. If -3 -2
-1
A =
-10 , then find A.
½
6
4. Find x such that 2x 7 -1
2 -7
=
1 2 -1 4 .
Example 1. Encode the message COME WITH ME using the encoding matrix
1 2 3
A= 2 -1 4
0 -1 1 .
Solution:
Assign a number to each letter in the English alphabet.
For convenience, let us associate each letter with its position in the
alphabet: A is 1; B is 2; and so on.
Let a space in between words be denoted by the number 27. Thus, the
message becomes:
C O M E W I T H M E
3 15 13 5 27 23 9 20 8 27 13 5 .
Using a 3x3 matrix to encode the message, break the enumerated message
up into a sequence of 3x1 column matrices as follows:
3 5 9 27
15 27 20 13
13 , 23 , 8 , and 5 .
Putting the message into code, multiply each of the above column
matrices by the encoding matrix. Conveniently, this can be done by
writing the above column matrices as column matrix and pre-multiplying
that matrix by the encoding matrix.
1 2 3 3 5 9 27
2 -1 4 15 27 20 13
0 -1 1 13 23 8 5
3 + 30 + 39 5 + 54 + 69 9 + 40 + 24 27 +26 + 15
= 6 – 15 + 52 10 – 27 + 92 18 – 20 + 32 54 – 13 + 20
0 – 15 + 13 0 – 27 + 23 0 – 20 + 8 0 – 13 + 5
72 128 73 68
= 43 75 30 61
-2 -4 -12 -8
3 5 9 27
= 15 27 20 13
13 23 5 5
The columns of this matrix, written in linear form, give the original
message.
3 15 13 5 27 23 9 20 5 27 13 5
C O M E W I T H M E
Name: Year & Section:
4 3
-3 -2 .
2. Encode the message I WILL SURVIVE using the matrix
1 -1 -2
2 -3 -5
-1 3 5 .
Introduction to LINEAR ALGEBRA for Computing Sciences
JOEL B. BACAY, MAEd. – Mathematics
1 2 -1
2 3 0
1 1 1 .
16
Introduction to LINEAR ALGEBRA for Computing Sciences
JOEL B. BACAY, MAEd. – Mathematics
4. Decode the message 49 , 38 , -5 , -3 , -61 , -39 , which was encoded using the
matrix in problem number 1.
17
Introduction to LINEAR ALGEBRA for Computing Sciences
JOEL B. BACAY, MAEd. – Mathematics
18
Lecture 3. Definition and Properties of Determinants
Determinant is a number associated with every square matrix. It is a tool used
in many branches of mathematics, science, and engineering.
The determinant of an n x n matrix A is denoted by A and is given by
1 4
A
-3 2
=
= (1)(2) – (4)(-3)
= 2 + 12
A = 14 .
= a11 a22 a33 – a11 a23 a32 – a12 a21 a33 + a12 a23 a31
+ a13 a21 a32 – a13 a22 a31 .
-1 -2 -1
A = 3 2 2
4 0 1
2 2 3 2 3 2
= -1 – (-2) + (-1)
0 1 4 4 0
Properties of Determinants
1. Let A be a square matrix and r be a nonzero scalar.
a) If a matrix B is obtained from A by multiplying the elements of a row or
column by r, then B = r A .
b) If a matrix B is obtained from A by interchanging two rows or columns, then
B = - A .
c) If a matrix B is obtained from A by adding a multiple of one row or column to
another row or column, then B = A .
2. Let A be a square matrix. A is singular whose A = 0 if
a) all the elements of row or column are zero.
b) two rows or columns are equal.
c) two rows or columns are proportional.
3. Let A and B be n x n matrices and r be a nonzero scalar.
a) Determinant of a scalar multiple
rA = rn A .
b) Determinant of a product
AB = A B .
c) Determinant of a transpose
AT = A .
d) Determinant of an inverse
1
A-1 =
A for A-1 exists.
4 3
b) -1 2 1
3 3 2
4 5 3
2. If 3 4 2
A = 2 5 0
3 0 1 , then show that AT = A .
3. If A and B are 3 x 3 matrices and A = -3, B = -2, then use the properties of
determinants to compute the following.
a) 3A2B
b) (A2B-1)T
4. If a b
= 5, then evaluate
c d
a) a+ 2c b + 2d
c d
b) a b
c + 3a d + 3b .
5. Prove that if A, B, and C are square matrices of the same size, then
ABC = A B C .
Lecture 4. Cofactor Expansions
Let A be a square matrix. The minor of an element aij with a determinant of
order n is denoted by Mij . It is the determinant of order n - 1 that retains after
omitting the ith row and the jth column of A.
Note: The minor and the cofactor differ only in sign, i.e.,
Aij = Mij .
Example 1: Determine the minors and the cofactors of elements a12 and a33 of the
matrix A.
2 -1 3
A = 4 2 1
0 3 2
= (4)(2) – (1)(0)
= 8–0
M12 = 8
Cofactor of a12 :
A12 = (-1)1+2 M12
= (-1)3 (8)
= -1(8)
A12 = -8
Minor of a33 :
2 -1
M33 =
4 2
= (2)(2) – (-1)(4)
= 4+4
M33 = 8
Cofactor of a33 :
A33 = (-1)3+3 M33
=
(-1)6 (8)
= 1(8)
A33 = 8
Note: The determinant of a square matrix is the sum of the products of the elements
of any row or column and their cofactors.
For ith row expansion,
A = ai1 Ai1 + ai2 Ai2 + … + ain Ain.
+ - + - …
- + - + …
+ - + - …
. . . . …
. . . . …
. . . . … .
Let A be an n x n matrix and Aij be the cofactor of aij. The matrix whose (i , j)th
element is Aij is called the matrix cofactors of A. The transpose of this matrix is called
the adjoint of A and is denoted by adj(A).
= -9 + 0 + 3
A = -6 .
Example 3: What is the matrix cofactors and the adjoint matrix of the matrix A ?
0 3 2
A = 1 -2 -1
2 5 1
-2 -1
A11 = (-1) 1+1
= (1)(-2 – -5) = 3
5 1
3 2
A21 = (-1)2+1 = (-1)(3 – 10) = 7
5 1
3 2
A31 = (-1)3+1 = (1)(-3 – -4) = 1
-2 -1
1 -1
A12 = (-1)1+2 = (-1)(1 – -2) = - 3
2 1
0 2
A22 = (-1)2+2 = (1)(0 – 4) = -4
2 1
0 2
A32 = (-1) 3+2
= (-1)(0 – 2) = 2
1 -1
1 -2
A13 = (-1)1+3 = (1)(5 – -4) = 9
2 5
0 3
A23 = (- = (-1)(0 – 6) = 6
1)2+3 2 5
0 3
= (1)(0 – 3) = -3 .
A33 = (- 1 -2
1)3+3
3 -3 9
7 -4 6
1 2 -3
3 7 1
adj(A) = -3 -4 2
9 6 -3 .
0 3 2
A = 1 -2 -1
2 5 1
by using
1
A-1 = adj(A).
A
Solution:
-2 -1 1 -1 1 -2
A = 0 – 3 + 2
5 2 1 2 5
1 3 7 1
A = -1 -3 -4 2
9 9 6 -3
1. Obtain the minors and the cofactors of elements a13 and a31 of the matrix
1 2 6
A = 2 4 3
7 3 -1 .
-3 -2 -5
B = 3 4 1
1 1 3 in terms of third row ?
3. Determine the matrix cofactors and the adjoint matrix of the matrix
1 5 2
Q = 0 2 3
4 1 3 .
.
4. Find the inverse of a matrix A below using its adjoint.
0 3 3
A = 1 2 3
1 4 6
5. Prove that (adj A)-1 = adj(A-1).
Lecture 5. Cramer’s Rule
Cramer’s rule is another method used in obtaining the values of the unknowns
for a given system of n linear equations. Let AX = B be a system of n linear equations
in n variables such that A 0.
The system has a unique solution given by
A1 A2 An
x1 = , x2 = , … , xn =
A A A
where Ai is the matrix obtained by replacing ith column by the constants b 1,
b2, … , bn .
Solution:
Let 1 2 3
A = B =
-1 5 4
A = (1)(5) – (2)(-1)
= 5+2
A = 7 .
3 2 1 3
A1 = A2
4 5 -1 4
=
= 15 – 8 = 4+3
A1 = 7 A2 = 7
= 7/7 = 7/7
x = 1 y = 1
Example 2: Find the solutions of the following system of linear equations by using
Cramer’s Rule.
x + 3y + z = -2
2x + 5y + z = -5
x + 2y + 3z = 6
Solution:
Let
1 3 1 -2
A = 2 5 1 B = -5
1 2 3 6
5 1 2 1 2 5
A = 1 – 3 + 1
2 3 1 3 1 2
-2 3 1 1 -2 1
A1 = -5 5 1 A2 = 2 -5 1
6 2 3 , 1 6 3 ,
1 3 -2
and A3 = 2 5 -5
1 2 6 .
6
= 1(30 + 10) – 3(12 + 5) – 2(4 – 5)
= 1(40) – 3(17) – 2(-1)
= 40 – 51 + 2
A3 = -9
x = 1 y = -2 z = 3
Example 3: Determine values of m for which the following system of equations has
nontrivial solutions. Find the solutions for each value of m.
(m +2)x + (m + 4)y = 0
2x + (m +1) y = 0
Solution:
m+2 m+4
= 0
2 m+1
(m + 2)(m + 1) – (m + 4)(2) = 0
2
m + 3m + 2 – 2m – 8 = 0
m2 + m – 6 = 0
(m + 3)(m – 2) = 0
Equating each factor to zero:
m+3 = 0 m–2 = 0
m = -3 m = 2
when m = -3, the system of equations becomes
-x + y = 0
2x – 2y = 0
Thus, the system of equations has many solutions, i.e.,
x = r
y = r .
when m = 2, the system of equations becomes
4x + 6y = 0
2x + 3y = 0
Thus, the system of equations has many solutions, i.e.,
y = r
x = - 3r/2 .
Name: Year & Section:
2. 5x + 2y + z = 8
x + 2y + 3z = 7
3x + 4y – 5z = 3
3. 2x + z = 36
3x – 4y = 2
2y + 5z = 9
4. Determine the values of r for which the following system of equations has
nontrivial solution. Find the solutions for each value of r.
(r + 4)x + (r – 2)y = 0
4x + (r -3) y = 0
5. Determine the values of t for which the following system of equations has
nontrivial solutions. Find the solutions for each value of t.
(5 – t)x + 4y + 2z = 0
4x + (5 – t)y + 2z = 0
2x + 2y + (2 – t)z = 0
Lecture 6. Applications of Determinants
A. Lines in rectangular coordinates system (R2)
Any 2 distinct points P1(x1, y1) and P2 (x2, y2) in R2 (Figure 2.4.1) determine a
straight line whose equation is
ax + by + c = 0
where a, b, and c are real numbers, and a and b are not both zero.
P2(x2, y2)
P1(x1, y1)
0
Figure 2.4.1
Since P1 and P2 lie on the line, their coordinates satisfy the equation of a straight
line:
ax1 + by1 + c = 0
ax2 + by2 + c = 0.
Thus, a linear system in the unknowns a, b, and c is obtained by
xa + yb + c = 0
x1a + y1b + c = 0
x2a + y2b + c = 0.
The system is a homogenous. It has nontrivial solution if and only if the determinant of
the coefficient matrix is zero, i.e.,
x y 1
x1 y1 1 = 0.
x2 y2 1
Example 1: Find the equation of the line determined by the points P1(2 , -1) and
P2(12 , 5).
x y 1
2 -1 1 = 0
12 5 1
-6x + 10y + 22 = 0
or -3x + 5y + 11 = 0 .
B. Planes in 3-dimensional spaces (R3)
An equation of the plane through non-collinear points P1(x1, y1, z1), P2(x2, y2,
z2), and P3(x3, y3, z3)
is given by
x y z 1
x1 y1 z1 1 = 0.
x2 y2 z2 1
x3 y3 z3 1
1 1 1 1 1 1 1 1 1 1 1 1
x 3 4 1 –y 2 4 1 + z 2 3 1 –1 2 3 4 =0
3 2 1 -5 2 1 -5 3 1 -5 3 2
4 1 3 1 3 4
x 1 – 1 + 1
2 1 3 1 3 2
4 1 2 1 2 4
– y 1 – 1 + 1
2 -5 1 -5 2
1
3 2 1 2 3
– 1 +
1 1 -5 3
+ z 1 -5 1
3
3 2 2 3
+ 1 = 0
4 4 -5 3
– 1 1 – 1
3 2 -5 2
or 4x + 19y – 14z – 9 = 0.
Name: Year & Section:
2. (1 , 2) and (3 , 6).
3. (4 , 3 , -2) , (1 , 0 , 2) , and (5 , -2 , 3).