Sma 212 Notes
Sma 212 Notes
1
SMA 212: LINEAR ALGEBRA I
Course Outline
Pre-requisite
To introduce the learner to basic matrix algebra and vectors together with their applications.
Matrices: Basic operations, reduction to echelon form, Determinants and inverses of 2x2 and
3x3 matrices. Systems of linear equations: Solution by reduction to echelon, Gauss Jordan,
Gaussian elimination, Crammer’s Rule and Inverse matrix method. Vectors: co-ordinate
systems, vectors and their components, basic operations on vectors, dot products and cross
products. Planes and lines in R 3 . Linear combination, dependence and independence. Vector
spaces: Subspaces, spanning sets, basis and dimension.
Mode of Delivery
Instructional Materials
Course Assessment
2
Core Reading Materials
1. Hoffman, K. and Kunze, R. (1971). Linear Algebra (2nd Edition) by Hoffman and Kunze,
Pearson Publishers.
2. Seymour L. and Marc L.(2012). Schaum’s Outline Series of Linear Algebra (5th Edition),
MacGraw-Hill Publishers.
3. Fraleigh, B. and Beauregard, R. (1994). Linear Algebra (3rd Edition), Pearson Publishers.
4. Sharma, J. and Vasishtha, R. (1982). Linear Algebra(2nd Edition), Krishna Prakashan
Media.
3
MATRICES
Matrices are used as shorthand for keeping essential data arranged in rows and columns i.e
matrices are used to summarize data in tabular form.
Order of a Matrix
The size of a Matrix is specified by the number of rows (horizontal) and the number of
columns (vertical).
aij
a11 a12 a1n
a a a
A 21 22 2n
i ith row
j jth column
am1 am 2 amn
Square matrix
A Square Matrix is a one with the same number of rows and columns i.e
n n matrix.
Two matrices are of the same size if they have the same order.
Vector
A vector is a matrix with one row (1 n) or one column (n 1). A row vector is of the form
1 n, and a column vector is of the form m 1.
(111111)-row vector
1
1
1 -column vector
1
1
Zero matrix
A zero matrix of order m n is the matrix with a ij 0 i 1, m, j 1 n .
Similarly we talk of zero rows and column vector;
0
0
0 0,0, 0 or .
0
Diagonal matrix
A diagonal matrix is a square matrix whose every entry is a zero except the entries in the
main (or principal or leading) diagonal.
EG:
4
1 0 0
A 0 3 0 is a diagonal matrix.
0 0 2
In particular, an identity matrix is a diagonal matrix whose every diagonal entry is a zero.
EG:
1 0 0
I 0 1 0 is a 3 3 identity matrix.
0 0 1
Triangular matrix
An upper triangular matrix is a square matrix whose every entry below the main diagonal is a
zero.
EG:
1 2 3 4
0 3 1 0
A is a 4 4 triangular matrix.
0 0 4 5
0 0 0 7
Similarly, a lower triangular matrix is a square matrix whose every entry above the main
diagonal is a zero.
Example
Given that
x y 2r s 4 6
, solve for x, y, s and r.
x y s r 2 3
Solution:
Since
x y 2r s 4 6
, then
x y s r 2 3
x y 4 i)
2s r 6 ii)
x y 2 iii)
sr 3 iv)
From i) and iii), x 3, y 1
From ii) and iv), s 3, r 0 .
5
Addition and Subtraction of matrices
This is performed on matrices of the same order (size). Let A and B be m n matrices.
A + B = aij bij aij bij cij , a m n matrix
Scalar Multiplication
This is performed on any matrix and the resulting matrix is the same size. Let A be any
matrix, then
c A c aij caij , where c is a scalar.
Each entry is multiplied by same scalar.
Dot product: let a and b be any two vector of size n (matrices with a single column or
row).
a = a1 , a2 , an , b b1 , b2 , bn . The dot product of a and b denoted a b , is given by
n
a b a1b1 a2b2 anbn a i bi .
i 1
The dot product is also scalar product.
Dot product of a row and column vector of order n is given by,
b1
n
b
a1 , a2 an 2 a1b1 a2b2 anbn ai bi a b
i 1
n
b
EG.
(2, 2, 1) . (1, -7, 1)= 2 1 2 (7) 11 2 14 1 11
Matrix Multiplication:
Let A aik be an m n matrix, and B bkj an n s matrix. The matrix product AB is
the m s matrix C cij , where c ij the dot product of the ith row of A and the jth column
of B.
n
i.e. AB C , aik bkj = cij ; C ij Ai B j a
k 1
ik bkj
Remark:
1. Let A m n , B s r be two matrices .
C AB exists iff n s and C is m n
C BA exists iff r m and C is s n
2. It’s possible for AB to be defined while BA is not defined i.e. matrix multiplication is not
commutative.
Examples
6
1 2 3 3 0 2
1. Let A and B . Then
4 5 6 7 1 8
1 3 2 0 3 2 4 2 5
A B
4 7 5 1 6 8 3 6 2
3 1 3 2 33 3 6 9
2. 3A
3 4 35 3 6 12 15 18
2 4 6 9 0 6 7 4 0
3. 2 A 3B
8 10 12 21 3 24 29 7 36
1 2 1 1
4. If C and D , then
3 4 0 2
1 2 1 1 1 1 2 0 1 1 2 2 1 5
CD
3 4 0 2 3 1 4 0 3 1 4 2 3 11
and
1 1 1 2 1 1 1 3 1 2 1 4 4 6
DC
0 2 3 4 0 1 2 3 0 2 2 4 6 8
The above example shows that matrix multiplication is not commutative, i.e.the products AB
and BA of matrices need not be equal.
Assessment Questions
1 3 2 0 4
1. Let A and B . Find (a) AB , (b) BA
2 1 3 2 6
1 2 0
2. Given A 2,1 and B , find (a) AB , (b) BA
4 5 3
2 1
1 2 5
3. Given A 1 0 and B , find (a) AB , (b) BA
3 4 3 4 0
Transpose of a matrix
The transpose of the matrix A is matrix B AT , such that bi j a ji i.e. the rows become
columns and vice versa.
7
Example 2.1
Find AT and AT given that,
T
2 1 3 5
A .
4 2 1 2
Solution
2 4
1 2 2 1 3 5
a) AT A
T
b) T
.
3 1 4 2 1 2
5 2
Example 2.2
Show that A B A B A 2 B 2 iff AB BA i.e A & B commute
Solution:
Suppose A B A B A 2 B 2 and show that A & B commute.
A 2 B 2 A B A B
A A B B A B (by left distributive law)
A 2 AB BA B 2
Hence AB BA 0 ; AB BA and so A & B commute.
Assume A & B commute & show that A B A B A 2 B 2
8
Since A & B commute AB BA , thus
A B A B A A B B A B
A 2 AB BA B 2
but AB BA; A 2 AB AB B 2 A 2 B 2
Assessment Questions
1 0 1 0
1. Find the transpose A of the matrix A 2 3 4 5
t
4 4 4 4
1 2 0
2. Let A . Find (a) AA , (b) A A
t t
3 1 4
9
DETERMINANTS OF 2 2 AND 3 3 MATRICES
Determinants are defined on square matrices only.
Determinant of 2 2 Matrices
a a12
Let A 11 . Then,
a21a22
a a12
det A 11 a11 a22 a12 a21 .
a21 a22
The determinant is a scalar.
Example 3.1
1. Find the value of such that 0.
3 2
Solution
2 3 2 5 0
3 2
5 0 0 or 5 .
1 x 1
2. Let 1 find x.
2 2x 2
x 3
3. Let 4 . Find x.
2 2x 1
Determinant of 3 3 Matrices
Method 1
+ - +
a11 a12 a13
Let A a21 a22 a23
a a33
31 a32 , then
+ - +
a11 a12 a12
a22 a23 a21 a23 a21 a22
det A a21 a22 a23 a11 a12 a13
a32 a33 a31 a33 a31 a32
a31 a32 a33
a11 a22 a33 a23a32 a12 a21a33 a23 a31 a13 a21a32 a22a31
10
a11 a 22 a33 a11 a 23 a32 a12 a 21 a33 a12 a 23 a31 a13 a 21 a32 a13 a 22 a31
a11 a 22 a33 a12 a 23 a 31 a13 a 21 a32 a11 a 23 a32 a12 a 21 a 33 a13 a 22 a31
Note: This is a sum of 6 products, 3 positive and 3 negative. Each product has exactly one
factor from each row and column.
Example 3.2
3 1 2
1. Evaluate 1 1 4
2 1 1
Solution:
3 1 2
1 4 1 4 1 1
1 1 4 3 1 2
1 1 2 1 2 1
2 1 1
3[ 11 1 4 ] 1[1(1) 8] 2[1 2] 9 7 2 0
1 3 1
2. Evaluate 2 1 2
1 1 2
Solution:
1 3 1
1 2 2 2 2 1
2 1 2 =1 3 1 14 32 1 3 5
1 2 1 2 1 1
1 1 2
Method 2
+ + + - - -
11
det A a11a22 a33 a12 a23a31 a13a21a32 a13 a22 a31 a11a23 a32 a12 a21a33 .
Example 3.3
2 3 4
A 1 4 2
3 10 1
Solution + + + - - -
2 -3 -4 2 -3
-1 4 2 -1 4
3 10 1 3 10
Assessment Questions
1. Evaluate the determinant of each matrix:
3 2 a b a
(a) , (b)
4 5 b a b
3 2 ab a
(i) 3 5 2 4 23 (ii) a b a b a a b 2
4 5 b ab
k k
2. Determine those values of k for which 0.
4 2k
k k
2k 4k 0 , or 2k k 2 0 .Hence k 0 ;and k 2 .That is, if k 0 or k 2 ,
2
4 2k
the determinant is zero.
3. Compute the determinant of each matrix:
12
1 2 3 2 0 1
(a) 4 2 3 (b) 4 2 3
2 5 1 5 3 1
Properties of determinants
1. det (AB) = det A . det B
1 2
det A det 3 2 1
1 3
3 6
det B det 9 6 3 3det A
1 3
1 2
det A det 3 2 1
1 3
5 10
det C det 5 A det 75 50 25 5 det A
2
5 15
1 2
Eg det 22 0.
1 2
1 2 R2 2 R1 1 2
1 2 1 2.1 3 2 2.2 6
8. det A det A
T
13
1 2
det A det 3 2 1
1 3
1 1
det AT 3 2 1 det A .
2 3
Example 4.1
a) det 2A b) det AB
Solution
a) det 2 A 23 det A 8 3 24
Assessment Questions
Evaluate
1 2 3 5 0 9
1. 2 1 3 2. 2 1 3
1 0 1 1 0 1
4 3 2 4 3 2
3. 3 2 5 4. 3 2 5
2 4 6 1 2 3
14
INVERSES OF 2 x 2 AND 3 x 3 MATRICES
Definition
A square matrix A is said to be invertible if there exists a matrix B with the property that
AB BA I ,
1 0
EG. I2
0 1
Let A be a matrix of order n n and aij be a general element of A. The minor of element aij
which we denote by M ij is the determinant of the n 1 n 1 submatrix which is
obtained after deleting the i th row and j th column of A.
Example 5.1
2 3 4
Let A 0 4 2 , find the minor and cofactor of each element of A.
1 1 5
Solution:
Minors
4 2 0 2 0 4
M 11 18 M 12 2 M 13 4
1 5 1 5 1 1
3 4 2 4 2 3
M 21 11 M 22 14 M 23 5
1 5 1 5 1 1
3 4 2 4 2 3
M 31 10 M 32 4 M 33 8
4 2 0 2 0 4
Cofactors
15
A11 (1) 2 M 11 18 A12 (1)3 M 12 2 A13 (1) 4 M 13 4
A21 11 A 22 14 A 23 5
A31 10 A 32 4 A 33 8
Example 5.2
Matrix of cofactors is
18 2 4
11 14 5 .
10 4 8
Therefore,
adj A 11 14 5 2 14 4 .
10 4 8 4 8
5
Theorem
1
A1 adj A .
A
In particular if n 2 ,
a b 1 1 d b
A and A .
c d ad bc c a
Proof
Cofactors of A;
16
A11 d d A12 c c
A21 b b A22 a a
A11 A12 d c
.
A21 A22 b a
Therefore
T
A A12 d b
adj A 11 .
A21 A22 c a
Hence
1 1 d b
A1 adj A .
A ad bc c a
Example 5.2
2 5 1
Let A , find A .
1 3
Solution:
det A 2 3 5 1 6 5 1.
Therefore,
1 3 5 3 5
A1 .
1 1 2 1 2
Inverse of a 3 X 3 matrix
Recall:
a11 a12 a13
Let A a21 a22 a23 , then
a a33
11 a32
T
A11 A12 A13
Adj (A) = A21 A22
A23 , the transpose of matrix of cofactors and
A A33
31 A32
1
A 1 adj(A)
det A
17
Example 5.3:
4 0 1
Find the inverse of A 2 2 0 .
3 1 1
Solution:
2 0 2 0 2 2
det A = 4 0 1 42 0 1 2 6 8 4 4 ; Therefore, A 1 exists.
1 1 3 1 3 1
Cofactors;
2 0 2 0 2 2
A11 2 A12 2 A13 4
1 1 3 1 3 1
0 1 4 1 4 0
A21 1 A22 1 A23 4
1 1 3 1 3 1
0 1 4 1 4 0
A31 2 A32 2 A33 8
2 0 2 0 2 2
Therefore
2 2 4 2 1 2
T
adj ( A) 1 1 4 2 1 2 .
2 2 8 4 4 8
Hence
2 1 2 1 2 1
4 12
adj ( A) 2 1 2 12 14 1
1 1
A1 2
det A 4
4 4 8 1 1 2
1. AA1 A1 A I
AB
1
2. B 1 A1
A A
T 1
1 T
3.
A A
1
1
4.
1
5. A .
A1
18
Assessment Questions
Find A 1 if
2 3 4
1. A = 0 4 2
1 1 5
19
REDUCTION OF A MATRIX TO ECHELON FORM
The leftmost non-zero entry in a non-zero row of an echelon matrix is called the leading
entry of that row.
Examples
1. The following matrices are in echelon form;
1 2 3 4
2 3 2 0 4 5 6 0 1 4 2
1 2 3
0 0 7 1 3 2 1 0 0 7 3
A , B 0 0 4, C .
0 0 0 0 6 2 2 0 0 0 0 0 0 9
0
0 0 0 0 0 0 1 0 0 0
0 0 0 0
Note: The leading entries of A are 2, 7, 6 and 1.
2 1 4 3
0 1 3 2
E .
0 2 3 1
0 2 6 4
20
Example 6.1
1 2 3 1
2 1 2 0
1. Reduce to echelon form.
1 2 1 1
1 1 3 3
Solution
1 2 3 1 R2 R2 2 R1 1 2 3 1 1 2 3 1
2 1 2 0 0 3 4 2 0 3 4 2
1 2 1 1 R3 R3 R1 0 0 2 2 R4 R4 R2 0 0 2 2
1 1 3 3 R4 R4 R1 0 3 0 2 0 0 4 4
1 2 3 1
0 3 4 2
R4 R4 2 R3 0 0 2 2
0 0 0 0
1 2 3 1
2. Reduce 2 1 2 2 to echelon form.
3 1 2 3
Solution:
1 2 3 1 R2 R2 2 R1 1 2 3 1 1 2 3 1
2 1 2 2 0 3 4 4 R 3R 7 R 0 3 4 4
3 1 2 3 R R 3R 0 7 7 6 3 3 2
7 10
3 3 1 0 0
3 4 1 1
3. Reduce 1 1 3 1 to echelon form.
4 3 11 2
Solution:
3 4 1 1 1 1 3 1 R2 R2 3R1 1 1 3 1
R2 R1
1 1 3 1 3 4 1 1 0 7 10 2
4 3 11 2 4 3 11 2 R R 4 R 0 1 1 2
3 3 1
21
1 1 3 1 1 1 3 1
R2 R3 R3 R3 7 R2
0 1 1 2 0 1 1 2
0 0 3 12
0 7 10 2
Examples
1 2 1 4
1. 1. Reduce 3 8 7 20 to reduced row-echelon (canonical) form.
2 7 9 23
Solution:
1 2 1 4 R2 3R1 1 2 1 4 1 1 2 1 4 1 2 1 4
2 R3 3R2
3 8 7 20 0 2 4 8 R2 0 1 2 4 0 1 2 4
2 7 9 23 R 2 R 0 3 7 15 0 3 7 15 0 0 1 3
3 1
R1 R3 1 2 0 1 1 0 0 5
R1 2 R2
0 1 0 2 0 1 0 2
R2 2 R3 0 0 1 3 0 0 1 3
3 4 1 1
2. Reduce 1 1 3 1 to (canonical) form.
4 3 2
11
Solution:
22
3 4 1 1 1 1 3 1 R2 3R1 1 1 3 1
1 1 3 1 R1 R2 3 4 1 1 0 7 10 2 R2 R3
4 3 11 2 4 3 11 2 R3 4 R1 0 1 1 2
1 1 3 1 R1 R2 1 0 2 1 1 1 0 2 1 R1 2 R3
3 R3
0 1 1 2 0 1 1 2 0 1 1 2
0 7 10 2 R3 7 R2 0 0 3 12 0 0 1 4 R2 R3
1 0 0 7
0 1 0 6
0 0 1 4
Example:
4 0 1
Find the inverse of A 2 2 0
3 1 1
Solution:
4 0 1 1 0 0 2 R2 R1 4 0 1 1 0 0
R3 R2
2 2 0 0 1 0 0 4 1 1 2 0
3 1 1 0 0 1 4 R 3R 0 4 1 3 0 4
3 1
1 R
8 1
4 0 1 1 0 0 2 R1 R3 8 0 0 4 2 4
1 R
0 4 1 1 2 0
0 8 0 4 2 4 8 2
0 0 2 2 2 4 2 R2 R3 0 0 2 2 2 4
1 R
2 3
1 0 0 12 1
4 12
0 1 0 12 14 12 .
0 0 1 1 1 2
Therefore,
23
12 1
4 12
1
A1 12 14 2
1 1 2
Assessment Questions
1 2 1
1. Reduce the matrix 2 1 1 to echelon form
7 4 1
2 2 1 3 1
3. Reduce the matrix 2 1 1 7 3 to echelon and canonical forms (row
7 4 1 4 2
reduced echelon form).
24
SOLUTION OF SYSTEMS OF LINEAR EQUATIONS (GAUSS-JORDAN METHOD)
Definition 7.2
A system of linear equations is a collection of several linear equations. A solution to a system
of linear equations in n variables is an n-tuple c1 , c 2 , , c n that satisfies each of the linear
equations in the system.
A linear system is said to be consistent if it has at least one solution and inconsistent if it has
none.
Methods of Solution
Elimination Method
The strategy is to eliminate one variable at a time by performing one of the following
elementary operations;
Example 7.1:
Solve by elimination method
x1 x 2 x3 5 (1)
x1 2 x 2 3x3 10 (2)
2 x1 x2 x3 6 (3)
Solution:
Eliminate x1 from equations (2) and (3),
x1 x2 x3 5 (1)
(2) – (1) x 2 2 x3 5 (4)
(3)– 2 (1) x2 x3 4 (5)
25
x2 2 x3 5
(5) + (4) x3 1
The elimination method is very tedious especially when there are many variables. We use a
much more organized elimination method in matrix form called Gauss-Jordan elimination
method.
The Gaussian elimination method involves reducing the augmented matrix A b to echelon
form and then doing back substitution.
Example 7.2:
Solution:
The Matrix form is,
26
1 2 1 x1 4
3 8 7 x2 20 .
2 7 9 x 23
3
We reduce the augmented matrix to echelon form,
1 2 1 4 R2 3R1 1 2 1 4 1 2 1 4 1 2 1 4
1 2 R2 R3 3R2
3 8 7 20 0 2 4 8 0 1 2 4 0 1 2 4
2 7 9
23 R3 2 R1 0 3 7
15 0 3 7
15 0 0 1 3
x1 2 x2 x3 4
x2 2 x3 4
x3 3
x3 3
Doing back substitution,
x2 4 6 2
x1 4 4 3 5
Solution: x1 5, x2 2, x3 3 .
Remark
1. Suppose a linear system is in echelon form i.e. the augmented matrix A b is an
echelon matrix. Then those variables that correspond to columns containing leading
entries are called leading (dependent) variables, all other variables are called free
(independent) variables. E.g. in the previous example 7.2 above x1 , x2 and x3 are
all leading/dependent variables.
2. A system of linear equations may have a unique solution, many solutions or no
solutions;
Unique solution: The number of unknowns and equations are equal in the echelon
form of the system. E.g. Example 7.2 had a unique solution
Many solutions: Equations are less than the unknowns in the echelon form of the
system.
No solution: Last row of the echelon form of the system if of the form 00 0 a 0
Example 7.3
Solve the following system using Gaussian elimination method;
27
x1 2 x2 3 x3 2 x4 x5 10
2 x1 4 x2 8 x3 3 x4 10 x5 7
3 x1 6 x2 10 x3 6 x4 5 x5 27
Solution:
x1
1 2 3 2 1 x2 10
2 4 8 3 10 x3 7
3 6 10 6 5 x
4 27
x
5
Reducing the augmented matrix to echelon form,
1 2 3 2 1 10 1 2 3 2 1 10 1 2 3 2 1 10
R2 2 R1
2 4 8 3 10 7
R3 3R1
0 0 2 1 8 13 R2 R3 0 0 1 0 2 3
3 6 10 6 5
27 3 0 0 2 1 8 13
0 0 1 0 2
1 2 3 2 1 10 1 2 3 2 1 10
R3
R3 2 R2 0 0 1 0 2 3 0 0 1 0 2 3
0 0 0 1 4
7 0 0 0 1 4 7
The leading variables (dependent variables) are x1 , x3 , x4 while the independent (free)
x3 =-2 x5 3 2t 3
28
x1 10 2 x2 3x3 2 x4 x5
10 2s 3 2t 3 2 4t 7 t 5 2s 3t
i.e.
x1 5 2s 3t
x2 s
x3 2t 3
x4 4t 7
x5 t
Or
x1 5 2 3
x2 0 1 0
x3 3 s 0 t 2 , s, t .
x4 7 0 4
x 0 0 1
5
Example
Solve using Gauss-Jordan method
2 x1 4 x 2 6 x3 20
3x1 6 x 2 x 3 22
2 x1 5 x 2 2 x3 18
Solution:
Matrix form
2 4 6 x1 20
3 6 1 x2 = 22
2 5 2 x 18
3
We reduce the augmented matrix to canonical form;
29
2 4 6 20 1 2 3 10 R2 3R1 1 2 3 10
1 2 R1
3 6 1 22 3 6 1 22 0 0 8 8
2 5 2 18 2 5 2 18 R 2 R 0 1 4 2
3 1
1 2 3 10 1 0 11 14 1 0 1114 R1 11R3
R1 2 R2 18 R3
R 2 R3 0 1 4 2 0 1 4 2 0 1 4 2
0 0 8 8 0 0 8 8 0
0 1 1 R2 4 R3
1 0 0 3
0 1 0 2
0 0 1 1
Therefore
1 0 0 x1 3
0 1 0 x2 2
0 0 1 x 1
3
Solution: x1 3, x2 2, x3 1
Remark 7.2
A system of linear equations is homogeneous if it can be written in the form Ax 0 , where
A is the coefficient matrix and 0 is the zero column vector. Such a system always has at least
one solution, namely x 0 (zero vector); this is usually called the trivial solution.
A non-trivial solution exists if and only if the system has at least one free (independent)
variable or if the determinant of the coefficient matrix is zero.
Assessment Questions
Solve the following system by Gauss Jordan (elimination) method.
1. x1 x 2 x3 2 x 4 1
2 x1 x2 3x4 0
x1 x2 x3 x4 1
x2 x4 1
2. x1 x 2 x3 x 4 4
x1 2 x 2 x3 x 4 7
2 x1 x 2 x3 x 4 8
x1 x 2 2 x3 2 x 4 7
3. x1 x2 2 x3 x4 3
30
x1 2 x2 x3 x4 2
x1 x2 x3 2 x4 1
2 x1 x2 x3 x4 4
4. x1 x2 2 x3 2
2 x1 3x2 x3 14
3x1 2 x2 x3 16
x1 4 x2 3x3 12
31
CRAMER’S RULE AND INVERSE MATRIX METHOD
Cramer’s Rule
This method uses determinants to solve a linear system Ax b provided determinant of A
(coefficient matrix) is nonzero.
a n1 x1 a n 2 x 2 a nn x n bn
Let denote the determinant of the matrix of coefficient A aij . Also, let i denote the
determinant of the matrix obtained after replacing the i th column of A by the column of
constant terms b b1 , b2 , , bn . Then the above system has a unique solution if and only if
T
Example 8.1
Solve the following linear system using Crammer’s rule
2 x1 3 x2 x3 1
x1 2 x2 x3 4
2 x1 x2 x3 3
Solution:
2 3 1 1
A 1 2 1 and b 4 .
2 1 1 3
Then
2 3 1
2 1 1 1 1 2
A 1 2 1 2 3 1 2 1 3 1 1 3 2 3 3 2.
1 1 2 1 2 1
2 1 1
Next,
32
1 3 1
2 1 4 1 4 2
1 4 2 1 1 3 1 1 3 2 4
1 1 3 1 3 1
3 1 1
4
x1
2
2
2 1 1
4 1 1 1 1 4
2 1 4 1 2 1 2 1 5 6
3 1 2 1 2 3
2 3 1
6
x2 3
2
2 3 1
2 4 1 4 1 2
3 1 2 4 2 3 1 4 15 3 8
1 3 2 3 2 1
2 1 3
8
x3 4
2
Examples:
1. Solve the linear system using the inverse matrix
x 2y 6
4x 3y 3
Solution:
1 2 x 6 1 2 1 3 2
; A , det A 3 8 5 ; A1
4 3 y 3 4 3 5 4 1
12
x 1 1 3 2 6 1 12 5
A b .
y 5 4 1 3 5 21 21
5
Solution: x 12 5 , y 215
33
2. Solve the linear system using the inverse matrix
x1 3x2 2 x3 3
2 x1 4 x2 2 x3 8
x1 2 x2 x3 10
Solution:
1 3 2 x1 3 1 3 2
2 4 2 x2 = 8 ; A 2 4 2
1 2 1 x 10 1 2 1
3
1 3 2 1 0 0 R2 2 R1 1 3 2 1 0 0 1 3 2 1 0 0
R2 R3
2 4 2 0 1 0 0 2 2 2 1 0 0 1 3 1 0 1
1 2 1 0 0
1 R3 R1 0 1 3 1 0 1 0 2 2
2 1 0
1 3 2 1 0 0 R1 3R2 1 0 7 2 0 3 4 R1 7 R3 4 0 0 8 7 2
0 1 3 1 0 1 0 1 3 1 0 1 0 4 0 4 3 2
R2
0 2 2 2 1 0 R3 2 R2 0 0 4 0 1 2 4 R2 3R3 0
0 4 0 1 2
1 R 2 7 1
4 1 1 0 0 4 2
1 R 0 1 0 1 3 1 .
4 2 4 2
1 R 0 0 1 0 1 1
4 3 4 2
Therefore
2 7 1
4 2
A 1 3
1 1
4 2
0 1 1
4 2
The solution is given by,
2 7 1
x1 4 2 3 3
1 1 8 2
x2 A b 1 4
3
2
x 10 3
3 0 1 1
4 2
Thus
x1 3, x2 2 , x3 3
34
Assessment Questions
Solve using Crammer’s rule.
1. 2x 5 y 2z 7
x 2 y 4z 3
3x 4 y 6 z 5
x1 3 x2 2 x3 3
2. 2 x1 4 x2 2 x3 8
x1 2 x2 x3 10
35
VECTORS
Co-ordinate Systems
Any point on the Cartesian plane (xy- plane) can be represented as a pair x0 , y0 where x 0
is the x coordinate and y 0 is y-coordinate. The Cartesian plane is denoted by 2 .
Next, 3 consists of three planes, xy - plane, xz - plane and yz - planes. The x-axis, y-axis
and z – axes all meet at 90 (are perpendicular) at the origin (0, 0, 0). The x-axis consists of
points x0 , 0, 0 , y-axis 0, y0 , 0 and z-axis 0, 0, z0 .
n consists of all n-tuples consisting of real entries i.e.
n a1 , a2 , , an : ai , i 1, 2, , n .
i 1, 0 , j 0, 1 .
~ ~
Similarly, in 3 , the unit vector along the x-axis is denoted by i and along the y-axis is
~
If x, y, z , then 3
x, y, z x i~ y j z k~ .
~
Length/Magnitude of a Vector:
Let a a1 , a2 be a vector in 2 . Then by Pythagoras Theorem,
a a12 a22
~
36
In general, if a a1 , a2 , , an n , then
~
a a12 a22 an 2
a) Equality of vectors
Let a a1 , a2 , , an , b b1 , b2 , , bn n , then
~ ~
a1 , a2 , , an b1 , b2 , , bn if ai bi , i 1, 2, ,n.
a b a1 , a2 , , an b1 , b2 , , bn a1 b1 , a2 b2 , , an bn .
~ ~
c) Scalar multiplication
Let a a1 , a2 , , an n and k be any scalar, then
~
Example 9.1
1. If u 4, 3 and v 2,3 , then
~ ~
u v 4, 3 2, 3 2, 0
~ ~
u v 4, 3 2, 3 6, 6
~ ~
2 v 2 2, 3 4, 6
~
On solving,
37 , 2 7 .
Therefore
3 3, 4 2 1, 1 1, 2 .
7 7
1. a b b a Commutative law
~ ~ ~ ~
2. a b c a b c
~ ~ ~ ~ ~ ~
Associative law
3. 0 a a 0 a Additive identity
~ ~ ~ ~ ~
~
4. a a a a 0
~ ~ ~
Additive inverse
5. a b a b
~ ~ ~ ~
Left distributive law
8. a = a
~ ~
Scalar pull through
9. 1.a a Multiplication identity
~ ~
Dot Products
Definition 9.1 (Algebraic definition of dot products)
Let a a1 , a2 , , an , b b1 , b2 , , bn n , then
~ ~
Example 9.2
a) 1, 2 2,3 1 2 2 3 8
b) 1, 2,3 1, 2,1 1 1 2 2 3 1 6
c) 2 i j 3 i j 2 3 1 1 5
~ ~ ~ ~
38
Definition 9.2 (Geometric definition of dot product)
If is the angle between the vectors a and b , then
~ ~
a b a b cos .
~ ~ ~ ~
Proof
(Exercise)
Hint: Use the Cosine Rule
Proof:
Let a a1 , a2 , b b1 , b2 2 and consider the figure below;
~ ~
By Cosine Rule,
2 2 2
a b a b 2 a b cos
~ ~ ~ ~ ~ ~
So
2 2 2
2 a b cos a b a b
~ ~ ~ ~ ~ ~
RHS
2 2 2
a b a b a1 , a2 b1 , b2 a1 b1 , a2 b2
2 2 2
~ ~ ~ ~
a12 a22 b12 b22 a12 2a1b1 b12 a22 2a2b2 b22
a12 a22 b12 b22 a12 2a1b1 b12 a22 2a2b2 b22
39
2a1b1 2a2b2
Therefore,
In general,
a1 , a2 , , an . b1 , b2 , , bn a b a1b1 a2b2
~ ~
anbn
~
2. a b c a b a c
~ ~
Distributive Property
~ ~ ~ ~
3. r a b a r b r a b Homogeneous property
~ ~ ~ ~ ~ ~
4. a 0 0
~ ~
a b
cos ~ ~
.
a b
~ ~
2
9. a aa aa a (Show using a vector in n ).
~ ~ ~ ~ ~ ~
Example 9.3:
1. Find the angle between u i 4 j 8k and v 5 i 4 j 3k .
~ ~ ~ ~ ~ ~ ~ ~
Solution:
i 4 j 8k 5 i 4 j 3k
u v ~
~ ~ ~
cos ~ ~ ~ ~
u v
~ ~
i 4 j 8k 5 i 4 j 3k
~ ~ ~ ~ ~ ~
40
5 16 24 45 1
12 42 82 52 42 32 81 50 2
1
cos 1 45 .
0
2
Solution:
3c 20 6 0
3c 26
c 26
3
Exercise
i j k
~ ~ ~
a2 a3 a1 a3 a1 a2
a b a1 a2 a3 i j k .
~ ~ ~ b2 b3 ~ b1 b3 ~ b1 b2
b1 b2 b3
Example 9: Let a 3 i j k ; b i 2 j k
~ ~ ~ ~ ~ ~
a) Find a b and b a
b) Show that a b is orthogonal to a
c) Show that a b is orthogonal to b
41
Solution:
a)
i j k
~ ~ ~
i) a b 3 i j k i 2 j k 3 1 1 i (1 2) j (3 1) k (6 1) i 4 j 7 k .
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
1 2 1
i j k
~ ~ ~
ii) b a i 2 j k 3 i j k 1 2 1 i (2 1) j (1 3) k ( 1 6) i 4 j 7 k .
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
3 1 1
ab ba
Conclusion: Vector products are not commutative
to a
c) b (a b) i 2 j k i 4 j 7 k 1 8 7 0 and therefore a b is orthogonal
~ ~ ~ ~ ~ ~
to b .
a b is a vector whose magnitude is a b sin , where is the angle between the vectors
~ ~ ~ ~
a and b . Now
~ ~
a b a b sin u , where u is a unit vector perpendicular to both a and b .
~ ~ ~ ~ ~ ~
42
-unit vector orthogonal to and
~
1. a a b 0 i.e a b is orthogonal to a
~ ~ ~ ~ ~
2. a b b a
~ ~ ~ ~
3. a b c a b a c
~ ~ ~ ~ ~ ~ ~
a b c a c b c
~ ~ ~ ~ ~ ~ ~
5. a a 0.
~ ~ ~
Remark
Two vectors a and b are parallel if a kb for some scalar k.
Assessment Questions
1
1. Compute the length of the vector v 2
3
~
2 4
. Show that the vectors u and v are orthogonal.
~
4 ~
2
43
PLANES AND LINES IN 3
Lines in 3-dimensions spaces
A line in space is determined by a single point P0 on it and a vector a that determines the
~
Line L
OP OP0 P0 P and P0 P is parallel to a a1 , a2 , a3 .
x, y, z x0 , y0 , z0 a1, a2 , a3 . 1)
x x0 a1
y y0 a2 2)
z z0 a3
These are parametric equations of line L through point P0 x0 , y0 , z0 and parallel to vector
a a1 , a2 , a3 .
~
44
Eliminating from 2) gives,
x x0 y y0 z z0
3)
a1 a2 a3
R (x, y, z)
A (2, -3, 4)
Line
OR OA AR,
OR OA a, where is a scalar
~
Thus
x, y, z 2, 3, 4 3, 5, 6
45
x2 y3 z 4
3 5 6
is the symmetric equation of the line.
Example
Find the equation of the line through the point A (1, 2, 3) and B (4, 4, 4), and find the co-
ordinates of the point where the line meets the plane z = 0.
Solution:
4 1 3
AB 4 2 2 is a vector parallel to the line passing through points A and B.
4 3 1
Let R (x, y, z) be any point on line AB, then
B (4, 4, 4)
R(x, y, z) A (1, 2, 3)
Line
OR OA AR.
So
OR OA t AB, where t is a scalar, thus
x 1 3
y 2 t 2
z 3 1
OR
x 4 3 4 3 3t 1 3
y
= OR = OB + BR OB + (1-t) BA 4
1 t
2 4 2 2t 2 t 2
z 4 1 4 1 t 3 1
The line meets z = 0 where the z-coordinate is 0. i.e. where 3 + t =0 t = -3.
Setting t = -3 in the vector equation, we obtain point
x 1 3 8
y 2 3 2 4
z 3 1 0
46
i.e. the line meets plane z = 0 at point 8, 4,0
Example10.3
x2 y 4 z 7
1. a) Write the line in form r a tu
3 5 2
b) Show that the line passes through (8, 14, 11).
c) Find the unit vector parallel to this line
Solution:
x2 y4 z 7
(a) t x 2 3t , y 4 5t , z 7 2t
3 5 2
x 2 3t 2 3
y 4 5t 4 t 5
z 7 2t 7 2
(b) Showing that it passes through (8, 14, 11)
x 2 3t 8
2 3t 8
y
4 5 t 14 4 5t 14 t 2
z 7 2t 11 7 2t 11
Thus
8 2 3
14 4 2 5
11 7 2
3
d) The vector parallel to this line is a~ 5 . The unit vector in the direction of a~ is
2
given by
3
3 3 38
1
a
1 1
5
5
5
a ~
32 52 22 2 38 2 38
~ 2
38
Exercise
x 2 4 x 10 2
2. Show that the equations y 3 m 6 and y 15 n 3 represent the
z 1 2 z 3 1
same line.
47
Planes in 3-dimensions spaces
A plane in 3-space can be specified by giving a non-zero vector that is perpendicular to the
plane called a normal and one of the points.
Suppose we want to find the equation of the plane passing through the point P0 x0 , y0 , z0
and having non-zero vector n a, b, c as a nomal.
~
P(x, y, z)
Then P0 P is orthogonal to n , so that
~
n . P0 P 0 1)
~
Since
P0 P x x0 , y y0 , z z0 ,
equation 1) becomes
a x x0 b y y0 c z z0 0 2)
We call this the point normal form of the equation of the plane.
Example 10.4
48
Find an equation of the plane passing through point (3, -1, 7) and perpendicular to the vector
n 4, 2, 5 .
~
Solution:
x 3, y 1, z 7
is a vector on the plane and must be perpendicular to n 4, 2, 5 . Therefore,
~
4, 2, 5 . x 3, y 1, z 7 0
4 x 3 2 y 1 5 z 7 0
4 x 12 2 y 2 5 z 35 0
Or
4 x 2 y 5 z 25 0
or
4 x 2 y 5 z 25 .
Note: 4, 2, 5 are the coefficients of x, y, z and they are the components of the vector
perpendicular to the plane (normal to the plane).
Theorem
If a, b, c and d are constants and a, b, c are not all zero, then the graph of the equation
ax by cz d
Example 10.5
Solution:
49
P1 P 2 2, 3, 1 1, 2, 1 1, 1, 2
P1 P 3 3, 1, 2 1, 2, 1 2, 3, 3
i j k
~ ~ ~
1 2 1 2 1 1
1 2 PP
PP 1 3 1 1 2 i j k 9 i j 5 k .
~ 3 3 ~ 2 3 ~ 2 3 ~ ~ ~
2 3 3
9 x y 5z d ,
d 9(1) 2 5 1 9 2 5 16 .
Example 9.5
Find the equation of the plane through 1, 2, 3 and perpendicular to the planes
2 x 3 y 4 z 1 and 3x 5 y 2 z 3 .
Solution:
i j k
~ ~
3 4 2 3
~
2 4
2, 3, 4 3, 5, 2 2 3 4 i j k 14 i 8 j k
~ 5 2 ~ 3 2 ~ 3 5 ~ ~ ~
3 5 2
50
Therefore equation of the plane perpendicular to the planes 2 x 3 y 4 z 1 and
3x 5 y 2 z 3 is
14 x 8 y z d .
14 1 8 2 3 14 16 3 1 .
14 x 8 y z 1 .
Example 10.6:
Solution:
Angle between the two planes is the same as the angle between their normal;
cos
2,1, 2 1, 2, 2
2,1, 2 1, 2, 2
224 4
9 9 9
4
cos 1 63.40 .
9
51
10.2.2.2 Distance from the origin to the plane ax by cz d
We know that a, b, c is a vector perpendicular to the plane. Place the tail of a, b, c at the
origin and multiply a, b, c with an appropriate scalar such that
a, b, c a, b, c
Since a, b, c lies on the plane, it must satisfy the equation of the plane.
That is,
a a b b c c d .
a 2 b2 c 2 d
d
.
a b2 c2
2
D a , b, c a b c .
2 2 2
2 a 2 2b 2 2 c 2
2 a 2 b2 c2
a 2 b2 c2
d
a 2 b2 c2
a b c
2 2 2
d
.
a b2 c2
2
Example 10.7
Solution:
52
d 2 2
D
a b c 22 32 1
2 2 2 2
14
Exercise
Hence find the distance from between point 1, 4, 3 and the plane 2 x 3 y 6 z 1
.
2. Find the equation of the plane through 4,1, 3 and 2, 1, 3 and perpendicular to
the plane 2 x 3 y 4 z 5 .
Example
1. Find the parametric equations of the line of intersection for the planes 3x 2 y 4 z 6 0
and x 3 y 2 z 4 0
Solution:
The line of intersection consists of all points x, y, z satisfying the linear system;
3x 2 y 4 z 6 or 3 x 2 y 4 z 6 or 3 x 2 y 4 z 6
x 3y 2z 4 11 y 2 z 6 11 y 2 z 6 z is a free variable
6 2t 26 16
Now, let z t , then y and x t
11 11 11 11
Therefore, the parametric équations of the line of intersection are,
26 16 6 2t
x t y , z t t
11 11 , 11 11
53
Note : Vector equation is
26 16
x 11 11
6 2
y 11 t 11 .
z
0 1
Solution:
To find the distance D between the planes, we may select an arbitrary point in one of the
planes and compute its distance to the other. By setting y z 0 in the equation
x 2 y 2 z 3 , we obtain point P0 3, 0, 0 in this plane. The distance between P0 and the
plane 2 x 4 y 4 z 7 is
2 3 4 0 4 0 7 1 1
D .
22 42 4 36 6
2
Exercise
x 1 1
1. Show that the line y 2 t 1 lies on the plane 2x +3y-5z = -7.
z 3 1
3 1 1 2
2. Show that the lines r 5 m 2 and s 2 n 3 do not meet i.e. they are skew
7 1 3 5
lines.
3. Find the equation of the plane through 1, 2, 4 and containing the line of intersection
Assessment Questions
1. Find the equation of the plane passing through the point 3,1,7 and perpendicular to the
vector n 4,2,5 .
54
2. Find the line through the point 1, 2, 3 and parallel to the vector v 4, 5, 7 .
3. (a) Find parametric equations for the line l passing through the points P1 2,4,1 and
P2 5,0,7 .
5. Find parametric equations for the line of intersection of the planes 3x 2 y 4 z 6 0 and
x 3 y 2 z 4 0.
55
LINEAR DEPENDENCE AND INDEPENDENCE OF VECTORS
Linear combinations
Definition (Linear Combination)
w c1v1 c2 v2 ck vk .
~ ~ ~ ~
Example 11.1
Solution:
c1 3c2 2
2c1 5c2 6 .
c1 4c2 3
1 3 2 R2 2 R1 1 3 2 1 3 2
R3 7 R2
2 5 6 0 1 2 0 1 2 .
1 4 3 R R 0 7 5 0 0 19
3 1
We see from the third row that the system is inconsistent, so the desired scalars c1 and c2 do
not exist. Hence w is not is a linear combination v1 and v2 .
~
Example 11.2
56
Express w 7, 7, 11 as a linear combination of the vectors
~
Solution:
Thus
c1 4c2 3c3 7
2c1 c2 c3 7
c1 2c2 3c3 11
1 4 3 7 R2 2 R1 1 4 3 7 1 4 3 7 1 4 3 7
1 7 R2 R3 6 R2
2 1 1 7 0 7 7 21 0 1 1 3 0 1 1 3 .
1 2 3 11 R R 0 6 6 18 0 6 6 18 0 0 0 0
3 1
Thus
c1 4c2 3c3 7
infinitely many solutions
c2 c3 3
w 4 v1 2 v2 v3 .
~ ~ ~ ~
w 7 v1 5 v2 2 v3
~ ~ ~ ~
and so on.
57
11.2.2 Linear Dependence and independence
Definition (Linear dependence): If v1 , v2 , , vk are vectors in n , we say that v1 , v2 , , vk
~ ~ ~ ~ ~ ~
are linearly dependent if one vector can be written as linear combination of the others.
Eg.
7, 7,11 , 4, 1, 2 , 1, 2,1 and 3,1,3 in the previous example are linearly dependent.
Theorem
Vectors v1 , v2 , , vk n are linearly dependent if and only if there exists scalars
~ ~ ~
Proof:
Suppose that v1 , v2 , , vk are linearly dependent, so one of the vectors say vk is a linear
~ ~ ~
combination of v , v , ,v ;
~1 ~ 2 ~ k 1
v c1 v c2 v ck 1 v ,
~k ~1 ~2 ~ k 1
so
c1 v c2 v ck 1 v v 0
~1 ~2 ~ k 1 ~k ~
Therefore,
c1 v c2 v ck 1 v ck v 0,
~1 ~2 ~ k 1 ~k ~
Then
ck v c1 v c2 v ck 1 v .
~k ~1 ~2 ~ k 1
c c c
v 1 v 2 v k 1 v i.e. v is a linear combination of its
~k
ck ~ 1 ck ~ 2 ck ~ k 1 ~k
Example 11.3
Are the vectors v 1, 2, 2, 1 , v 2, 3, 4, 1 and v 3, 8, 7, 5 in 4 linearly dependent?
~1 ~2 ~3
58
Solution:
Set c1v1 c2 v2 c3 v3 0
~ ~ ~ ~
i.e.
c1 1, 2, 2, 1 c2 2, 3, 4, 1 c3 3, 8, 7, 5 0, 0, 0, 0
Thus
c1 2c2 3c3 0
2c1 3c2 8c3 0
2c1 4c2 7c3 0, homogeneous linear system
c1 c2 5c3 0
We solve by Gaussian elimination method,
1 2 3 0 R2 2 R1 1 2 3 0 1 2 3 0
2 3 8 0 0 1 2 0 R4 R2 0 1 2 0
2 4 7 0 R3 2 R1 0 0 1 0 0 0 1 0 .
1 1 5 0 R4 R1 0 1 2 0 0 0 0 0
Thus
c1 2c2 3c3 0
c2 2c3 0 c1 0, c2 0, c3 0
c3 0
Since there is no free variable, the system does not have a non-trivial solution. Infact,
c1 0, c2 0, c3 0 . Hence the vectors are not linearly dependent.
c1v1 c2 v2 ck vk 0 implies c1 c2 ck 0 .
~ ~ ~ ~
Example 11.4
Determine whether the vectors v 1, 2, 1 , v 2, 1, 1 and v 7, 4, 1 are linearly
~1 ~2 ~3
independent.
Solution:
Set
c1 1, 2,1 c2 2,1, 1 c3 7, 4,1 0 0, 0, 0 .
~
Then
59
c1 2c2 7c3 0
2c1 c2 4c3 0
c1 c2 c3 0
Reducing the augmented matrix to echelon form,
1 2 7 0 R2 2 R1 1 2 7 0 1 2 7 0 1 2 7 0
5R3 3R2 15
2 1 4 0 0 5 10 0 0 5 10 0 R2 0 1 2 0 .
1 1 1 0 R R 0 3 6 0 0 0 0 0 0 0 0 0
3 1
Thus
Since c3 is a free, the homogeneous system has a non-trivial solution. Thus the three vectors
are not linearly independent, they are linearly dependent.
Example 11.5
Show that the vectors v 6, 2, 3, 4 , v 0, 5, 3, 1 , v 0, 0, 7, 2 are linearly
~1 ~2 ~3
independent.
Solution:
Set
c1 6, 2, 3, 4 c2 0, 5, 3, 1 c3 0, 0, 7, 2 0 0, 0, 0, 0 .
~
Then
6c1 =0
2c1 5c2 0 c1 0, c2 0, c3 0
3c1 3c2 7c3 0
4c1 c2 2c3 0
Accordingly, v , v and v are linearly independent.
~1 ~ 2 ~3
NOTE:
Observe that vectors in the preceding example form a matrix in echelon form;
6 2 3 4
0 5 3 1
0 0 7 2
Thus, we have shown that the non-zero rows of the above echelon matrix are independent;
the results holds true in general.
Theorem
60
The non-zero rows of a matrix in echelon form are linearly independent.
Example 11.6
Determine whether the following vectors in 4 are linearly dependent or independent;
i) 1, 3, 1, 4 , 3, 8, 5, 7 , 2, 9, 4, 23
ii) 1, 2, 4, 1 , 2, 1, 0, 3 , 3, 6, 1, 4
Solution:
i) Form a matrix whose rows are the given vectors and row reduce to echelon form;
1 3 1 4 R2 3R1 1 3 1 4 1 3 1 4
R3 3R2
3 8 5 7 0 1 2 5 0 1 2 5 .
2 9 4 23 R 2 R 0 3 6 15 0 0 0 0
3 1
Since the echelon matrix has a zero row, the vectors are linearly dependent.
1 2 4 1 R2 2 R1 1 2 4 1
ii) 2 1 0 3 0 5 8 5 .
3 6 1 4 R 3R 0 0 11 1
3 1
Since the echelon matrix has no zero row, the vectors are linearly independent.
Further Example
Write the polynomial v t 2 4t 3 as a linear combination of the polynomials
e1 t 2 2t 5, e2 2t 2 3t , and e3 t 3 .
Solution
Set v as a linear combination of ei using the unknowns x, y and z ; v xe1 ye2 ze3
t 2 4t 3 x t 2 2t 5 y 2t 2 3t z t 3 .
xt 2 2 xt 5 x 2 yt 2 3 yt zt 3z
x 2 y t 2 2 x 3 y z t 5x 3z
Equating corresponding coefficients, we obtain
x 2y 1
2 x 3 y z 4
5x 3 z 3
Reducing the augmented matrix to echelon form;
1 2 0 1 R2 2 R1 1 2 0 1 1 2 0 1
R3 10 R2
2 3 1 4 0 1 1 6 0 1 1 6
5 0 3 3 R 5 R 0 10 3 8
3 1 0 0 13 52
61
Therefore
x 2y 1
yz 6
13z 52 z 4, y 2, x 3
So
v = -3e1 + 2e2 + 4e3
Exercise
Determine whether or not the following vectors in 3 are linearly dependent:
62
VECTOR SPACES
Vector space
Definition (Vector space): A vector space is a non-empty V of objects, called vectors, on
which are defined two operations, called addition and multiplication by scalars, subject to the
axioms below. For all u, v, w V and all scalars c and d ;
~ ~ ~
2. u v v u . Additive commutativity
~ ~ ~ ~
3. u v w u v w .
~ ~ ~ ~ ~ ~
Additive Associativity
4. There is a vector in V , denoted by 0 and called the zero vector, for which u 0 u for
any vector u V . Additive identity
5. For each u V , there is a vector u V such that u u 0 .
~ ~ ~
~
Additive inverse
6. The scalar multiple of u and c , denoted c u is in V.
~ ~
Closure under scalar multiplication
7. c u v c u c v .
~ ~ ~ ~
Left distributive law
9. c d u cd u .
~ ~
Scalar multiplication associativity
Example
1. The set
n
a , a ,
1 2
, an an is a vector space.
2. M n , m , the set of all n m matrices over is a vector space with respect to the
operations of usual addition of matrices and multiplication of matrices by a scalar.
3. pn x , the set of all polynomials a0 a1 x a2 x2 an xn with real coefficients is a
vector space with respect to addition of polynomials and multiplication by a constant.
The zero vector in pn x is the polynomial 0 0 x 0 x 2 0 x n
4. Let F ,be the set of all functions f : , then F is a vector space. Given two
functions f and g in F and a real number c , the functions f g and cf are
defined as follows;
f g x f x g x
and
cf x c f x
63
Subspace of a subspace
Definition(Subspace): Let W be a non-empty subset of a vector space V . Then W is a
subspace of V if W is itself a vector space with respect to the operations of addition and scalar
multiplication as defined in in V.
Theorem:
A non-empty subset W of a vector space V is a subspace of V if and only if
i) u, w W , u w W -Closure under addition:
~ ~ ~ ~
Examples:
1. Show that W x, y x 0 is a subspace of 2 .
Solution:
W is the y-axis
i) Let u x1 , y1 , w x2 , y2 W , then x1 x2 0 .
~ ~
Now,
u w x1 , y1 x2 , y2 x1 x2 , y1 y2
~ ~
and
x1 x2 0 .
u w W
~ ~
and
kx1 k.0 0 k u W .
~
Hence W is a subspace of 3 .
2. Show that W x, y
x 2 y 2 is not a subspace of 2 .
Solution:
x2 y 2 x2 y 2 0
x y x y 0
Either
x y or x y i.e. W is a union of two straight lines
We need to give a counter example;
64
Now, u 1, 1 , w 1, 1 W
~ ~
but
u w 1, 1 1, 1 0, 2 W since 0 2 2 2 .
~ ~
u w x1 , y1 , z1 x2 , y2 , z2 x1 x2 , y1 y2 , z1 z2
~ ~
and
x1 x2 y1 y2 z1 z2 x1 y1 z1 x2 y2 z2 0 0 0 .
u w W
~ ~
and
kx1 ky1 kz1 k x1 y1 z1 k .0 0
.
k u W
~
Hence W is a subspace of 3 .
Remark 12.1
1. To show W is a subspace, prove in general and to show that W is not a subspace, give
a counter example.
2. Subspaces of 2 are: 0 , 2 , lines through the origin
~
Further Examples
Determine whether
a) W ( x, y) : y x 2 is a subspace of 2 .
b) W (a, b, c) : ab 0 is a subspace of 3 .
65
Solution
a) W ( x, y) : y x 2 is not a subspace of 2 for let
u (1,1), w (1,1) W .
~ ~
But
u w (1,1) (1,1) (0, 2) W , since 22 0 .
~ ~
But
u w (1, 0,1) (0,1,1) (1,1, 2) W , since 1.1 0 .
~ ~
Theorem
Let u1 , u2 , , um n and W be the set of all linear combinations of u1 , u2 , , um . Show that
~ ~ ~ ~ ~ ~
W is a subspace of n .
Proof
i) Let x, y W , then
~ ~
Now,
x y (k1 c1 )u1 (k2 c2 ) u2 (km cm ) um W .
~ ~ ~ ~ ~
ii) If k is a scalar,
k x k k1u1 k2 u2 km um x (k k1 )u1 (kk 2 ) u2 (kk m ) um W .
~ ~ ~ ~ ~ ~ ~ ~
Hence W is a subspace of n .
Exercise
1. Show whether or not the following are subspaces of 3 ;
a) W (a, b, c) : a b c 1
b) W ( x, y, z ) : y 2 x
2. Suppose U and V are subspaces of n . Show that U V is a subspace of n .
66
Spanning Sets
Definition (Spanning Sets)
If u1 , u2 , , um are vectors in a vector space V, then the set of all linear combinations of
~ ~ ~
Example
1. is spanned by (1, 0, 0), (0,1, 0), (0, 0,1) since if x, y, z 3 , then
3
So,
( x, y ) (2 y x)(1, 1) ( x y )(2, 1)
ax
yz
c
2
2 x y z
b
2
Therefore,
2 x y z yz
( x, y, z ) x(1,1,1) (0,1,1) (0,1, 1)
2 2
Since the system is consistent, then (1,1,1), (0,1,1), (0,1, 1) span 3 .
67
4. Is (1,1) a spanning set for 2 ?
Solution:
(1,1) is not a spanning set for 2 since for example (1, 2) 2 but
Definition (Basis)
Let B be a finite subset of a vector space V. Then B is said to be a basis for V if;
i) B spans V.
ii) B is a linearly independent set.
Examples
1. (1, 0), (0, 1) is a basis for 2 since for any x, y 2 ,
( x, y ) x(1, 0) y (0, 1) ,
Thus (1, 0), (0, 1) spans 2 .
Also (1, 0), (0, 1) is linearly independent since
a(1, 0) b(0, 1) (0, 0) a 0 and b 0 ,
so (1, 0), (0, 1) is a linearly independent set.
Therefore, (1, 0), (0, 1) forms a basis for 2
2. Already, we have shown that (1,1), (2,1) span 2 . It can be checked that
(1,1), (2,1) is a linearly independent set. Hence
(1,1), (2,1) forms a basis for 2 .
3. (1, 0, 0), (0,1, 0), (0, 0,1) forms a basis for 3 .
4. (1, 0, 0), (0,1, 0), (0, 0,1),(1,1,1) span 3 for if x, y, z 3
x, y, z x(1, 0, 0) y(0,1, 0) z(0, 0,1) 0(1,1,1)
But (1, 0, 0), (0,1, 0), (0, 0,1),(1,1,1) is not linearly independent since
and so (1, 0, 0), (0,1, 0), (0, 0,1),(1,1,1) does not form a basis for 3 .
68
Example
Determine whether or not (1,1,1), (1, 2, 3),(2, 1,1) form a basis for 3 .
Solution
Since the vectors are 3 in number, we only need to check for linear independence;
1 1 1 1 1 1 1 1 1
1 2 3 0 1 2 0 1 2
2 1 1 0 3 1 0 0 5
The echelon matrix has no zero rows, hence the three vectors are linearly independent and so
form a basis for 3 .
Definition (Dimension):
Let V be a vector space and B be a basis for V, then the dimension of V, which is denoted by
dimV is the number of vectors in B.
Theorem
Suppose B1 and B2 are both basis of V. Then B1 and B2 have the same number of vectors,
so dimension of a vector space is non-ambiguous. It does not depend on the basis you choose.
Corollary
Dimension of n is n.
Remark:
Let
e (1, 0, 0, , 0)
~1
e (0,1, 0, , 0)
~2
e (0, 0, 0, ,1)
~n
EG:
Solution:
The non-zero rows (1, 2, 5, 3) and (0, 7, 9, 2) of the echelon matrix form a basis for W.
Thus in particular dimension of W is 2.
ii) We seek four independent vectors which include the above two vectors. The vectors
Alternatively;
Definition (Dimension)
The dimension of a vector space can also be defined as the number of degrees of freedom
when choosing a vector in a vector space.
It is also the number of free or independent variables when choosing a vector in a vector
space.
Examples
1. 3 x, y, z : x, y, z
We have only one free variable, hence dimU 1. A basis for U is 2,1,3
4. Find the dimension and a basis for
W x, y, z, w : x y z w 0 .
Solution:
The equation has 3 free variables i.e. y, z and w and so dimW 3
Set i) y 1, z 0, w 0
ii) y 0, z 1, w 0
iii) y 0, z 0, w 1
to obtain the respective basis
1,1,0,0 , 1,0,1,0 , 1,0,0,1 .
5. Find the dimension and a basis for
W a, b, c, d : b 2c d 0 .
Solution
b 2c d 0 or 0. a b 2c d 0
We have 3 independent variables, hence dimW 3 .
Set i) a 1, c 0, d 0
ii) a 0, c 1, d 0
iii) a 0, c 0, d 1
Thus a basis for W is
1,0,0,0 , 0, 2,1,0 , 0, 1,0,1 .
Definition:
Let U and V be subspaces of n , then
U V u v : u U , v V
~ ~ ~ ~
is a subspace of n called the sum of U and V.
Theorem
dim(U V ) dim U dim V dim(U V ) .
Example
Let
U x, y, z, w : x y z w 0, x y z w 0
and
71
V x, y, z, w : x y z w 0 .
a) U
b) V
c) U V
d) U V
Solution:
i) U x, y, z, w : x y z w 0, x y z w 0
We first solve the two equations simultaneously;
Set i) z 1, w 0
ii) z 0, w 1 ,
Set i) y 1, z 0, w 0
ii) y 0, z 1, w 0
iii) y 0, z 0, w 1
1,1,0,0 ,(1,0,1,0),(1,0,0,0) .
iii) U V consists of all those vectors x, y, z, w satisfying conditions defining U and
V;
72
x y zw0 x yzw0 x yzw0
x y zw0 or 2 y 2w 0 or 2y 2w 0 or
x yzw0 2 y 2 z 2w 0 2z 0
x yzw0
y w0
z 0
The system has one free variable i.e. w, hence dim U V 1 . A basis of this
subspace is 0, 1, 0, 1 .
iv) dim(U V ) dim U dim V dim(U V )
2 3 1 4 .
A basis for U V is
1, 0,1, 0 , (0, 1, 0,1),(1,1, 0, 0), (1, 0,1, 0) .
Exercise
Let U and W be the following subspaces of 4 ;
U a, b, c, d : b c d 0
and
W a, b, c, d : a b 0, c 2d
a) U
b) W
c) U W
d) U W
73
74
75
76