Uploaded by opet

matrices

advertisement
Chapter 1
SYSTEMS OF LINEAR
EQUATIONS AND
MATRICES
CHAPTER 1
SYSTEMS OF LINEAR EQUATIONS AND MATRICES
1.1 Matrices and Matrix Operations
1.2 Diagonal and Triangular Matrices
1.3 Systems of Linear Equations
1.4 Gaussian Elimination
1.5 Properties of Matrix Operations
SECTION 1.1
MATRICES AND MATRIX OPERATIONS
Definition 1.1:
.
➢ A matrix is a rectangular array of real numbers.
➢ The numbers in the array are called the entries of the matrix. The
horizontal entries in a matrix are called rows and the vertical
entries are called columns
➢ A matrix A with m rows and n columns is called an m-by-n matrix
(written m × n)
➢ m and n are called its dimensions
➢ The general m × n matrix A = [aij] might be written as:
 a11


A =  ai1


 am1

a1 j
aij
a mj
a1n 


ain 


amn 
➢ A 1 x n matrix (one row and n columns) is called a row vector
➢ An m x 1 matrix (m rows and one column ) is called a column
vector.
Examples:
(a)
(b)
a =  2 4 −1 1 x 3 row vector
1 
2
b= 
0
 
4
(c) Matrices:
4 x 1 column vector
 2 0 1
A= 

5
1
3


and
7 6 
B =  0 1 
 2 3 
➢ Two matrices are equal if they have the same size, and their
corresponding entries are equal.
➢ Thus, 𝐀 = 𝐁 if and only if 𝒂𝒊𝒋 = 𝒃𝒊𝒋 for all 1 ≤ 𝑖 ≤ 𝑚 and 1 ≤
𝑗 ≤ 𝑛.
Example 1.1:
Given that 𝐀 = 𝐁 such that
1
𝑎
0 −2
𝐀= 3
1
𝑏 and 𝐁 = 𝑑
𝑒
−2 −1 5
𝑐
1
𝑓
−2
8
5
Answers:
𝑎 = 1; 𝑏 = 8; 𝑐 = 0; 𝑑 = 3; 𝑒 = −2 and 𝑓 = −1.
Arithmetic of Matrices
Condition for Matrix Addition and Subtraction:
A and B must be matrices of equal size
❑ A + B: add the corresponding entries of A and B
❑ A – B: subtract the corresponding entries of B from those of
A
❑ kA (scalar multiplication): multiply each entry of A by k
Example 1.2:
1
0 −2
1 2 3
If 𝐀 = 3
1 −3 and 𝐁 = 4 5 6 , compute 𝐀 + 𝐁.
−2 −1 5
7 8 9
Solution
2 2 1
1
0 −2
1 2 3
𝐀+𝐁= 3
1 −3 + 4 5 6 = 7 6 3
5 7 14
−2 −1 5
7 8 9
Example 1.3:
1
0 −2
1 2 3
If 𝐀 = 3
1 −3 and 𝐁 = 4 5 6 , compute 𝐀 − 𝐁.
−2 −1 5
7 8 9
Solution
1
𝐀−𝐁= 3
−2
0 −2
1 2 3
0 −2 −5
1 −3 − 4 5 6 = −1 −4 −9
−1 5
7 8 9
−9 −9 −4
Example 1.4:
−1 0 1
3
If 𝐀 =
and 𝐁 =
2 −1 3
−1
𝟏
1 2
, compute 2𝐀, 𝐁
𝟐
0 1
and 2𝐀 − 2𝐁.
Solution:
−2 0 2
𝟐𝐀 =
,
4 −2 6
−2 0
2𝐀 − 2𝐁 =
4 −2
𝟏
𝐁
𝟐
=
3
2
1
−
2
2
6 2 4
−8
−
=
6
−2 0 2
6
1
2
1
0
1
2
,
−2 −2
−2 4
Example 1.5:
Consider matrices,
4 
 a 1 −1
 6 26
 a −24 −6 
A =  0 b 1  , B =  8 10 a + 6  and C =  −8 −4 −10 
 1 3 7 
 −3 5
 5
24 
c
−10 
Find the values of a, b and c such that
B = 2A − C
Condition for Matrix Multiplication:
The product AB is of size m x n
SECTION 1.2
DIAGONAL AND
TRIANGULAR MATRICES
Diagonal Matrix
A general 𝑛 x 𝑛 diagonal matrix D can be written as
𝑑1 0
0 𝑑2
𝐃=
⋮ ⋮
0 0
⋯ 0
… 0
⋱
⋮
⋯ 𝑑𝑛
The inverse of diagonal matrix D,
1
𝑑1
𝐃−𝟏 = 0
⋮
0
0
1
𝑑2
⋮
0
⋯
0
⋯
0
⋯
⋮
1
𝑑𝑛
Power of D,
𝑘
𝑑1
0
𝑘
𝐃 = 0 𝑑2
⋮ ⋮
0 0
⋯
…
0
0
⋱
⋮
𝑘
⋯ 𝑑𝑛
An upper triangular
A lower triangular
matrix
matrix
SECTION 1.3
SYSTEMS OF LINEAR EQUATIONS
Two types of system:
1. Nonhomogeneous system,
A𝐱 = 𝐛
a11 x1 + a12 x2 +
+ a1n xn = b1
a21 x1 + a22 x2 +
+ a2 n xn = b2
am1 x1 + am 2 x2 +
+ amn xn = bm
2. Homogeneous system,
A𝐱 = 𝟎
a11 x1 + a12 x2 +
+ a1n xn = 0
a21 x1 + a22 x2 +
+ a2 n xn = 0
am1 x1 + am 2 x2 +
+ amn xn = 0
Type of solutions for A𝐱 = 𝐛
1. Exactly one solution/ a unique solution
y
➢ Two lines intersect at a single point
1
y=− x+2
2
y=
2
x +3
3
x
2. No solution
➢ The two lines are parallel – they do not intersect each other
y
y=
y=
2
x +3
3
2
x +1
3
x
3. Infinitely many solution
➢ Two lines are identical – superimpose on each other
y
y=
2
x +3
3
x
Type of solutions for A𝐱 = 𝟎
y
1. Trivial solution – exactly one solution
y=
3
x
4
x
1
y=− x
4
y
y=−
2
x
3
x
2. Non-trivial solutions – infinitely many
solutions
➢ The system with at least one solution is said to be
consistent
➢ The system with no solution is said to be inconsistent
➢ Since the homogeneous, 𝐴𝒙 = 𝟎 system has either one or
many solution, it is said to be always consistent.
Linear system in matrix form
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 = 𝑏2
⋮
⋮
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 = 𝑏𝑚
𝑎11 𝑎12 ⋯ 𝑎1𝑛
𝑎21 𝑎22 ⋯ 𝑎2𝑛
⋮
⋮
𝑎𝑚1 𝑎𝑚2 ⋯ 𝑎𝑚𝑛
𝑏1
𝑥1
𝑥2
𝑏2
=
⋮
⋮
𝑥𝑛
𝑏𝑚
Augmented Matrices
a11 x1 + a12 x2 +
+ a1n xn = b1
a21 x1 + a22 x2 +
+ a2 n xn = b2
am1 x1 + am 2 x2 +
+ amn xn = bm
 a11

a21

→


 am1
a12
a22
am 2
a1n b1 

a2 n b2 


amn bm 
OR
a11 x1 + a12 x2 +
+ a1n xn = 0
a21 x1 + a22 x2 +
+ a2 n xn = 0
am1 x1 + am 2 x2 +
+ amn xn = 0
 a11

a21

→


 am1
a12
a22
am 2
a1n 0 

a2 n 0 


amn 0 
Elementary Row Operations (ERO)
1. Multiply any row through by a non-zero constant.
2. Interchange any two rows
3. Add a constant multiple of one row to another
Elementary Row Operations (ERO)
1. Multiply any row through by a non-zero
constant
5
3
7
0 −2
1
3
−1 4
4𝑅1 → 𝑅1
20 0
3
1
7 −1
−8
3
4
Elementary Row Operations (ERO)
2. Interchange any two rows
5
3
7
0 −2
1
3
−1 4
𝑅1 ↔ 𝑅3
7
3
5
−1
1
0
4
3
−2
Elementary Row Operations (ERO)
3. Add a constant multiple of one row to another
5
3
7
0
1
−1
−2
3
4
𝑅2− 2𝑅3 → 𝑅2
5
−11
7
0 −2
3 −5
−1 4
SECTION 1.4
GAUSSIAN ELIMINATION
Row Echelon Form (REF)
1. All zero rows at the bottom of the matrix.
2. The first nonzero number in each row is a leading 1 for
that row.
3. Each leading 1 is to the right of all leading 1’s in the rows above it.
0

0
0

0
1 −2 3 2 

0 1 1 7
0 0 1 2

0 0 0 0 
Row Echelon Form: Attained by
Gaussian Elimination
Reduced Row Echelon Form (RREF)
1. Row echelon form
2. Each leading 1 is the only nonzero number in its column.
1 1 0 0
0 0 1 0 


0 0 0 0
Reduced Row Echelon Form: Attained by
Gauss- Jordan Elimination
Steps of reducing a matrix to the Row Echelon Form (REF)
1. Identify the 1st leading 1 position (pivot element)
➢ must be on the 1st row and try to have it on the 1st column (if
possible).
➢ If the number is not 1, change it to 1
2. Change all numbers below the leading 1 to zero.
** (REF)
3. Identify the 2nd pivot
➢ must be on the 2nd row and try to have it on the 2nd column (if
possible)
➢ If it is not 1, then change it to 1
4. Change all numbers below the leading 1 to zero
5. Repeat steps 3 and 4 for the next pivot (if any) until the last row
Steps of reducing a matrix to the Reduced Row Echelon
Form (RREF)
1. Identify the 1st leading 1 position (pivot element)
➢ must be on the 1st row and try to have it on the 1st column (if
possible).
➢ If the number is not 1, change it to 1
2. Change all numbers below the leading 1 to zero.
** (RREF)
3. Identify the 2nd pivot
➢ must be on the 2nd row and try to have it on the 2nd column (if
possible)
➢ If it is not 1, then change it to 1
4. Change all numbers above and below the leading 1 to zero
5. Repeat steps 3 and 4 for the next pivot (if any) until the last row
Example 1.9
Solve the following linear systems using Gaussian elimination method.
(a)
x1 + 2 x2 + 3 x3 = 5
2 x1 + 5 x2 + 3 x3 = 3
x1 + 8 x3 = 17
➔
1 2 3 5 


2 5 3 3 
1 0 8 17 
1 2 3 5 


2
5
3
3


1 0 8 17 
Example 1.11
Solve the following linear systems using Gauss-Jordan elimination
method.
(a)
x+ y−z =0
x + 2y + z = 0
3x + 4 y − z = 0
➔
1 1 −1 0 


1 2 1 0 
3 4 −1 0 
Theorem 1.1
A homogeneous system of linear equations with
more unknowns than equations has infinitely many
solutions ( non-trivial solutions)
The example illustrates the presence of a parameter t in the
nontrivial solution of Ax =0.
 1 0 0 −1 0 


0 1 0 1 0
 0 0 1 −1 0 


 1 −1 1 −3 0 


 0 1 −1 2 0 
 0 0 1 −1 0 


x1 − x4 = 0,
x2 + x4 = 0,
x3 − x4 = 0
Let x4 = t ;
 x1 = t ,
x2 = −t ,
x3 = t
Determining Consistency by Elimination
Consider a general augmented matrix for variables x, y, and z.
a b c d 
0 e f g 


 0 0 h i 
 a1 b1 c1 d1 
a b c d 
 2 2 2 2
 a3 b3 c3 d3 
(a) There is a unique solution if h not equal zero.
1
0


0
b
c
1
0
f
h
d
g

i

(b) There are infinitely many solutions which can be written in terms of a
free variable called parameter if
1 b
0 1

0 0
c
f
0
d
g 
0 
(c) There is no solutions if i not equal zero
1 b
0 1

0 0
c
f
0
d
g 
i 
Solutions
1
1
k
2 


2
 −1 5k − 1 −5k + 9k 25k − 2 
 −1
2
k 2 − 4k + 5 14 − k 
Find the values of k (if any) so that the system,
a)Has many solutions.
b)Has exactly one solution.
c)Has no solution.
SECTION 1.5
PROPERTIES OF MATRIX OPERATIONS
Theorem 1.2: Properties of Matrix Addition and Scalar Multiplication
Let A, B, and C be matrices of equal size so that the given operations can be
performed, and a, b, c are any real numbers.
a) A + B = B + A
(Commutative law for +)
b) A + (B + C) = (A + B) + C
(Associative law for +)
c) A(BC) = (AB)C
(Associative law for x)
d) A (B + C) = AB + AC
(Left distributive law)
e) (B + C) A = BA + CA
(Right distributive law)
f) A (B – C) = AB – AC
g) (B – C) A = BA – CA
h) a(B + C) = aB + aC
i) a (B − C) = aB – aC
j) (a + b)C = aC + bC
k) (a − b)C = aC − bC
l) a(bC) = (ab) C
m) (aBC) = (aB)C = B(aC)
Note that: The order matters in
matrix multiplication which is: AB  BA
Identity matrices
An identity matrix is a square matrix of size n × n with 1’s on the
main diagonal and 0’s elsewhere. It is denoted as In. Some examples
are:
1 0 
I2 = 
,

0 1 
1 0 0 
I 3 = 0 1 0 
0 0 1 
,
1
0
I4 = 
0

0
0 0 0
1 0 0 
0 1 0

0 0 1
Theorem 1.4:
Let R be the reduced row-echelon form of an n × n matrix A.
Then either R has a row of zeros or R is the identity matrix In.
Matrix Inverses
Definition 1.7: An n x n matrix A is called invertible if there exists
an n x n matrix B such that AB = BA= I. In this case, B is called an
inverse of A.
Theorem 1.5: If B and C are both inverses of the matrix A, then
B = C.
Thus, if A is invertible, its inverse will be denoted by 𝐀−𝟏 such that
−1
−1
AA = A A = I
Inverse of a 2x2 matrix
𝑎
Theorem 1.6: The matrix 𝐀 =
𝑐
𝑏
is invertible if 𝑎𝑑 − 𝑏𝑐 ≠ 0 in
𝑑
which case the inverse is given by the formula
−𝟏
𝐀
1
𝑑
=
𝑎𝑑 − 𝑏𝑐 −𝑐
−𝑏
𝑎
More Results on Invertible Matrices
Theorem 1.7: Let A and B be invertible matrices of the same size.
Then AB is invertible and 𝐀𝐁
−1
= 𝐁 −1 𝐀−1 .
Theorem 1.8: Let A be invertible and n be a non-negative integer.Then:
(a)
A−1 is invertible and (A−1) −1 = A.
(b)
An is invertible and (An) −1 = (A−1)n = A−n for n = 1, 2, …
(c)
For any nonzero scalar k, the matrix kA is invertible and
(kA)−1 = k−1A−1
Transpose of matrix
If A is any n × m matrix, then the transpose of A, denoted by AT, is
defined to be the m × n matrix that results from interchanging the rows
and columns of A.
Examples:
TT
11 00 −−11   11 22 00 
(a)
(a)  2 2 33 00  == 00 33 44 
00 44 11   − −11 00 11 
TT
 11 44 
11 −−22 33 




(b)
(b)  − −22 55  == 

4
4
5
5
−
−
6
6

 33 −−66   
AT for a square matrix A can also be obtained by reflecting A about its
main diagonal.
Properties of a Transpose Matrix
Theorem 1.9: If the sizes of the matrices are such that the stated
operations can be performed, then
a) ((A)T)T = A
b) (A+B)T = AT + BT and (A − B)T = AT − BT
c) (k A)T = k AT , where k is any scalar
d) (AB)T = BT AT
Remark:
The transpose of a product of any number of
matrices is the product of the transposes in the
reverse order.
Theorem 1.10:
Let A be an invertible matrix.Then AT is also invertible and
𝐀𝑇
−1
= 𝐀−1
𝑇
Download