Linear Algebra Notes For CS, Aug 2024
Linear Algebra Notes For CS, Aug 2024
Lecture Notes
Dr. Ali Koam and Dr. Azeem Haider
August 17, 2024
1
Department of Mathematics, College of Science, Jazan University
Contents
1 Real Vector Spaces 6
2 Subspaces 11
2.1 Building Subspaces . . . . . . . . . . . . . . . . . . . . . . . . 14
7 Linear Transformations 40
7.1 Kernel and Range . . . . . . . . . . . . . . . . . . . . . . . . . 44
-2-
Department of Mathematics, College of Science, Jazan University
To Students
Quizzes/ Assignments:
There will be many quizzes/ assignments (probably one almost every week
period). Quizzes/ assignments will be related to current and previous topics.
There will be no make-up quizzes/ assignments in case you missed it. Quizzes
will be given only to those students who are present when the quizzes are
passed out.
-3-
Department of Mathematics, College of Science, Jazan University
Preface
-4-
Department of Mathematics, College of Science, Jazan University
HAjÊ¢Ö Ï @ Ñj.ªÓ
Union XAm' @
Linear Dependance ù¢k AJ.KP@
Linear Independance ù¢k ÈC® J@
Dimensions XAªK. @
Trivial é¯AK
Associative ùªJÒm.'
Linear Transformation ù¢k ÉK ñm'
Intersection ©£A® K
Direct Sum Qå AJ.Ó ©Ôg.
Rank éJ.KP
Nullity éK Q®
Image
èPñ
Inner Product úÎg@X H. Qå
Orthogonal ø XñÔ«
Subspace ùKQk. ZA¯
Vector Space HAêj . JÓ ZA¯
Basis
èY«A¯
Eigenvalue éJ K@ X éÒJ
¯
Eigenvector úG@ X éj JÓ
.
Polynomial XðYg èQJ»
linear combination ù¢mÌ '@ I.J»QË@
Identity matrix
èYK Am× é¯ñ®Ó
Inverse ñºªÓ
Characteristic
èQÜØ
Kernel
è@ñK
Range øYÖÏ @
Angle éK ð@P
-5-
Department of Mathematics, College of Science, Jazan University
2. u + (v + w) = (u + v) + w
3. u + v = v + u
9. a.(b.u) = (ab).u
10. 1.u = u
Example 1.1. Let V = {0}. Then all vector space axioms are trivially sat-
isfied, and this simplest example of a vector space called ”zero vector space.”
Example 1.2. Let V = Rn . Then it forms a vector space with usual addition
and scalar multiplication of n−tuple.
Example 1.3. Let V = Mm×n (R), the set of all m × n matrices with real
entries. Then it forms a vector space with usual addition and scalar multi-
plication of matrices.
-6-
Department of Mathematics, College of Science, Jazan University
Example 1.4. Let V = Z, the set of integers. Then with respect to usual
addition and scalar multiplication of numbers, it does not forms a vector space
as for any non integer scalar r, r × 1 = r 6∈ Z. For example, 12 × 1 = 12 6∈ Z.
Now in the following theorem we study some basic properties in a vector
space. Note that 0 means zero scalar and 0 means zero vector.
Theorem 1.5. Let V be a vector space. The for any scalar ”a” and any
vector u ∈ V .
(i). 0.u = 0
(ii). a.0 = 0
(iii). (−1).u = −u
(−1).u = −u.
Part (iv). For any vector u ∈ V and a scalar a, if a.u = 0, then either a = 0
or a 6= 0.
If a = 0, then we are done.
If a 6= 0, then we have scalar a−1 such that,
-7-
Department of Mathematics, College of Science, Jazan University
(a−1 a).u = 0
1.u = 0
u = 0.
-8-
Department of Mathematics, College of Science, Jazan University
3u+2v = 3(−1, 2)+2(2, −4) = (−3, 6)+(4, −8) = (−3+4+1, 6+(−8)+1) = (2, −1).
-9-
Department of Mathematics, College of Science, Jazan University
Exercise 1:
(ii). Is V a vector space with usual addition and given scalar multiplication?
If yes, prove it. If no, state at least one axiom that fails.
- 10 -
Department of Mathematics, College of Science, Jazan University
2 Subspaces
It is possible for one vector space to be contained within another. We will
explore this idea in this section, we will discuss how to recognize such vector
spaces, and we will give a variety of examples that will be used in our later
work.
Definition 2.1. A subset W of a vector space V is called a subspace of
V if W is itself a vector space under the addition and scalar multiplication
defined on V .
Theorem 2.1. If W is a set of one or more vectors in a vector space V ,
then W is a subspace of V if and only if the following conditions hold.
(a). If u and v are vectors in W , then u + v is in W .
(b). If k is any scalar and u is any vector in W , then ku is in W .
Proof. If W is a subspace of V , then all the vector space axioms hold in W ,
including Axioms 1 and 6, which are precisely conditions (a) and (b).
Conversely, assume that conditions (a) and (b) hold. Since these are Axioms
1 and 6, and since Axioms 2, 3, 7, 8, 9, and 10 are inherited from V , we only
need to show that Axioms 4 and 5 hold in W .
For the purpose, let u be any vector in W . It follows from condition (b) that
ku is a vector in W for every scalar k. In particular, 0u = 0 and (−1)u = −u
are in W , which shows that Axioms 4 and 5 hold in W .
Remark 2.2. Note that every non-zero vector space has at least two sub-
spaces, itself and its zero subspace.
Example 2.3. If V is any vector space, and if W = {0} is the subset of
V that consists of the zero vector only, then W is closed under addition and
scalar multiplication since
0+0=0
and
k0 = 0
for any scalar k. We call W the zero subspace of V .
Example 2.4. If W is a line through the origin of either R2 or R3 , then
adding two vectors on the line W or multiplying on the line W by a scalar
produces another vector on the line W , so W is closed under addition and
scalar multiplication (see the following Figure for an illustration in R3 ).
- 11 -
Department of Mathematics, College of Science, Jazan University
- 12 -
Department of Mathematics, College of Science, Jazan University
Part (b). Since (1, 0), (0, 1) ∈ W2 but (1, 0) + (0, 1) = (1, 1) 6∈ W2 or the
identity (0, 0) 6∈ W2 . Hence W2 is not a subspace of R2 .
Question 3: Decide which of the following subsets are subspaces of M2×2 (R).
a b
(a). W1 = | a, b, c ∈ R .
b c
a b
(b). W2 = | ad − bc = 0 .
c d
0 0
Solution: Part (a). Clearly ∈ W1 , so W1 is non empty.
0 0
a1 b 1 a2 b 2
Take A = and B = ∈ W1 .
b1 c 1 b2 c2
a1 + a2 b 1 + b 2
Now A + B = ∈ W1 .
b1 + b2 c 1 + c 2
a b
Also for any scalar k and a matrix A = ∈ W1 ,
b c
ka kb
we have k.A = ∈ W1 . Hence W1 is a subspace of M2×2 (R).
kb kc
1 0 0 0
Part (b). Take A = and B = ∈ W2 .
0 0 0 1
- 13 -
Department of Mathematics, College of Science, Jazan University
1 0
But A + B = 6∈ W2 . Hence W2 is not a subspace of M2×2 (R).
0 1
Question 4: Decide which of the following subsets are subspaces of R[x].
(a). W1 = {a + bx| b 6= 0}.
(b). W2 = {a + bx + cx2 | a + b + c = 0}.
Solution: Part (a). For f = 1 + x, g = 1 − x ∈ W1 we have f + g = 2 6∈ W1
or additive identity 0 6∈ W1 . Hence W1 is not a subspace of R[x].
Part (b). Since 0 + 0x + 0x2 = 0 ∈ W2 implies W1 is non-empty.
Take f = a1 + b1 x + c1 x2 , g = a2 + b2 x + c2 x2 ∈ W2 , so a1 + b1 + c1 = 0 and
a2 + b2 + c2 = 0. Now
f + g = (a1 + b1 x + c1 x2 ) + (a2 + b2 x + c2 x2 )
= (a1 + a2 ) + (b1 + b2 )x + (c1 + c2 )x2
with (a1 + a2 ) + (b1 + b2 ) + (c1 + c2 ) = (a1 + b1 + c1 ) + (a2 + b2 + c2 ) = 0 + 0 = 0,
which gives f + g ∈ W2 .
For any scalar k and any f = a + bx + cx2 ∈ W2 with a + b + c = 0.
We have k.f = (ka)+(kb)x+(kc)x2 such that (ka)+(kb)+(kc) = k(a+b+c) =
k(0) = 0. Hence k.f ∈ W2 which concludes W2 is a subspace of R[x].
- 14 -
Department of Mathematics, College of Science, Jazan University
The union of any two subspaces is not a subspace in general as shown in the
following question.
Question 5: Consider two subspaces W1 = {(a, 0)| a ∈ R} and W2 =
{(0, b)| b ∈ R} of R2 . Show that union W1 ∪ W2 is not a subspaces of R2 .
Solution: Take (1, 0), (0, 1) ∈ W1 ∪W2 but (1, 0)+(0, 1) = (1, 1) 6∈ W1 ∪W2 .
Hence W1 ∪ W2 is not a subspace of R2 .
In order to achieve smallest subspace which contains any given two subspaces
of a vector space, we state following.
1. U + W = V.
2. U ∩ W = {0}.
We write it as, V = U ⊕ W .
- 15 -
Department of Mathematics, College of Science, Jazan University
Exercise 2:
Question 1: Write any two non-zero elements from the given subsets.
(a). S1 = {(a, b, c)| a + b = 2 + c} ⊆ R3 .
4
(b). S2 = {(a, a+d=b+c}⊆R .
b, c, d)|
a b
(c). S3 = { | c = b and a = d2 } ⊆ M2×2 (R).
c d
Question 2: Decide which of the following subsets are subspaces of the
given vector spaces.
(a). W1 = {(a, b)| a + b = 0} ⊆ R2 .
(b). W2 = {(a, 0, c)| a, c ∈ R} ⊆ R3 .
(c). W3 = {a + bx| a = b + 1} ⊆ P1 (x).
a b
(d). W4 = { | ad − bc 6= 0} ⊆ M2×2 (R).
c d
a b
(e). W5 = { | a + d = 0} ⊆ M2×2 (R).
c d
- 16 -
Department of Mathematics, College of Science, Jazan University
in the form,
w = a1 v1 + a2 v2 + a3 v3 + . . . + an vn ,
or
(9, 2, 7) = (a + 6b, 2a + 4b, −a + 2b)
Equating corresponding components gives,
a + 6b = 9
2a + 4b = 2
−a + 2b = 7.
Solving this system we get a = −3 and b = 2. Now w = (−3).u+2.v (verify).
Similarly for w0 to be a linear combination of u and v, there must be scalars,
- 17 -
Department of Mathematics, College of Science, Jazan University
say a and b such that; w0 = a.u + b.v, similarly following above steps and
equation corresponding components we get,
a + 6b = 4
2a + 4b = −1
−a + 2b = 8.
There are no such scalars a and b exist that is above system of equations is
inconsistent (verify). Consequently, w0 is not a linear combination of u and
v.
subspace of V.
(b). The set W in part (a) is the smallest subspace of V that contains all
of the vectors in S in the sense that any other subspace that contains
Proof. Part (a). Let W be the set of all possible linear combinations of the
non empty. Now we must show that W is closed under addition and scalar
u = a1 v1 + a2 v2 + . . . + an vn and v = b1 v1 + b2 v2 + . . . + bn vn ∈ W,
u + v = (a1 v1 + a2 v2 + . . . + an vn ) + (b1 v1 + b2 v2 + . . . + bn vn )
- 18 -
Department of Mathematics, College of Science, Jazan University
Hence W is a subspace of V .
Part (b). Let W 0 be any subspace of V that contains all of the vectors in S.
Definition 3.2. The subspace of a vector space V that is formed from all
(0, 0, 0, . . . , 1) spans Rn .
Example 3.4. The vectors 1, x, x2 , . . . , xn spans Pn (x) (the set of all poly-
- 19 -
Department of Mathematics, College of Science, Jazan University
a1 v1 + a2 v2 + . . . + an vn = 0
Example 4.1. The set, S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is linearly indepen-
linearly independent in Rn .
- 20 -
Department of Mathematics, College of Science, Jazan University
Solution: Part (a). Consider the equation a(5, −1) + b(0, 3) = (0, 0) for any
scalars a and b. After simplification we get,
5a = 0 and − a + 3b = 0
a + 5b = 0 and − 2a − 10b = 0
which implies
a = −5b and 0.b = 0.
It shows that b can be any real number. It shows that we have infinite
solutions. Hence S1 is linearly dependent in R2 .
- 21 -
Department of Mathematics, College of Science, Jazan University
Exercise 3 & 4:
(b). S2 = {2 + x, 1 − x2 , 1 + x + x2 }.
- 22 -
Department of Mathematics, College of Science, Jazan University
(b). S spans V .
Example 5.1. The set, S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} forms a basis for
In general, the set S = {(1, 0, 0, . . . , 0), (0, 1, 0, . . . , 0), . . . (0, 0, 0, . . . , 1)} forms
Example 5.4. The basis for zero vector space V = {0} is the set φ.
A vector space that can be spanned by finitely number of vectors is called
finite-dimensional vector space. A vector space that cannot be spanned
by finitely many vectors is said to be infinite-dimensional vector space.
Example 5.5. The spanning set for the vector spaces R∞ and the set of
- 23 -
Department of Mathematics, College of Science, Jazan University
Our goal now in this section is to establish basic theorems to find a basis for
a vector space.
(b). If a set has less than n vectors, then it does not span V.
For Proof follow book [1]. Above Theorem 5.6 enable us to state following
fundamental result.
Theorem 5.7. All bases for a finite-dimensional vector space have the same
number of vectors.
As the number of vectors in a basis for a vector space is constant, this leads
to define dimension.
Example 5.8.
dim(Rn ) = n
dim(Pn (x)) = n + 1
dim(Mm×n (R)) = m × n.
The vector space R∞ and the vector space R[x] are infinite dimensional.
- 24 -
Department of Mathematics, College of Science, Jazan University
The next theorem reveals two important facts about the vectors in a finite-
dimensional vector space V :
1. Every spanning set for a subspace is either a basis for that subspace or
has a basis as a subset.
2. Every linearly independent set in a subspace is either a basis for that
subspace or can be extended to a basis for it.
space V.
(a). If S spans V but is not a basis for V, then S can be reduced to a basis
- 25 -
Department of Mathematics, College of Science, Jazan University
(b). If S is a linearly independent set that is not a basis for V, then S can
Exercise 5.13. Decide which of the following set of vectors forms a basis
(v). S5 = {1 − x, 2x + x2 , 1 − 3x − x2 } ⊂ P2 (x).
1 −1
−1 1 0 1 1 0
(vi). S6 = , , , ⊂ M2×2 (R).
1 0 0 1 −1 1 1 −1
- 26 -
Department of Mathematics, College of Science, Jazan University
Part (ii). Since |S2 | = 3 > dim(R2 ) = 2. By Theorem 5.6, it follows that S2
is linearly dependent and hence does not forms a basis for R2 .
Part (iii). Since |S3 | = 2 < dim(R3 ) = 3. By Theorem 5.6, it follows that S3
does not span R3 and hence does not forms a basis for R3 .
Part (iv). Since |S4 | = 3 = dim(R3 ) = 3, so we see if S4 is linearly indepen-
dent?
1 2 1
Take 3 −2 0 = 1(−2 − 0) − 2(3 − 0) + 1(3 − 2) = −7 6= 0.
−1 1 1
Which shows that S4 is linearly independent and by Theorem 5.11, forms a
basis for R3 .
Part (v). Since |S5 | = 3 = dim(P2 (x)) = 3, so we see if S5 is linearly inde-
pendent?
We take coefficients of polynomials in S5 and get,
1 −1 0
0 2 1 = 1(−2 + 3) + 1(0 − 1) + 0(0 − 2) = 1 − 1 + 0 = 0.
1 −3 −1
Which shows that S5 is linearly dependent and hence does not forms a basis
for P2 (x).
Part (vi). Since |S6 | = 4 = dim(M2×2 (R)) = 4, so we see if S6 is linearly
independent?
For any scalars a, b, c and d we take,
1 −1 −1 1 0 1 1 0 0 0
a +b +c +d =
1 0 0 1 −1 1 1 −1 0 0
a − b + d −a + b + c 0 0
=
a−c+d b+c−d 0 0
Implies a − b + d = 0, −a + b + c = 0, a − c + d = 0 and b + c − d = 0.
After simplification we get, a = b = c = d = 0, which shows that S6 is lin-
early independent and hence by Theorem 5.11 it forms a basis for M2×2 (R).
- 27 -
Department of Mathematics, College of Science, Jazan University
then:
Exercise 5.15. Find a basis and dimension for the following subspaces of
- 28 -
Department of Mathematics, College of Science, Jazan University
implies W2 =span{(1, 0, 1), (0, 1, 2)} also it is easy to verify that the set
{(1, 0, 1), (0, 1, 2)} is linearly independent and hence forms a basis for W2 .
Clearly dim(W2 ) = 2.
Part (iii). For any vector a + bx + cx2 ∈ W3 we have b = c, which gives,
implies W3 =span{1, x+x2 } also it is easy to verify that {1, x+x2 } is linearly
independent and hence it forms abasis for W3 . Clearly dim(W3 ) = 2.
a b
Part (iv). For any vector ∈ W4 we have a+d = b+c ⇒ a = b+c−d,
c d
which gives,
a b b+c−d b b b c 0 −d 0
= = + +
c d c d 0 0 c 0 0 d
1 1 1 0 −1 0
=b +c +d
0 0 1 0 0 1
1 1 1 0 −1 0
implies W4 =span , , also it is easy to ver-
0 0 1 0 0 1
ify that it is linearly independent and hence forms a basis for W4 . Clearly
dim(W4 ) = 3.
- 29 -
Department of Mathematics, College of Science, Jazan University
Exercise 5:
Question 1: Write the standard basis for vector spaces R4 and P3 (x).
Question 2: Decide which of the following subsets forms a basis for the
given vector spaces.
(c). S3 = {2 + x, 3 − x2 , 5 + x − x2 } ⊆ P2 (x).
3 −8 4 −1 8 8
(d). S4 = , , ⊂ M2×2 (R).
1 9 2 1 −8 0
Question 3: Write a basis and dimension for the following subspaces of the
given vector spaces.
- 30 -
Department of Mathematics, College of Science, Jazan University
The vectors,
R1 = a11 a12 . . . a1n
R2 = a21 a22 . . . a2n
..
.
Rm = am1 am2 . . . amn
in Rn are called row vectors of the matrix A.
The vectors,
a11 a12 a1n
a21 a22 a2n
C1 = .. , C2 = .. , . . . Cn = ..
. . .
am1 am2 amn
- 31 -
Department of Mathematics, College of Science, Jazan University
Then row vectors of A are, R1 = 1 2 −1 , and R2 = 3 4 2 .
1 2 −1
The column vectors of A are, C1 = , C2 = and C3 = .
3 4 2
by the row vectors of A is called the row space of A, and the subspace of Rm
6.1 Basis for row space, column space and null space
We first developed elementary row operations for the purpose of solving linear
systems or to find the basis for row and column spaces, and performing
an elementary row operation on an augmented matrix does not change the
solution set of the corresponding linear system. It follows that applying an
elementary row operation to a matrix A does not change the solution set of
the corresponding linear system AX = 0, or, stated another way, it does not
change the null space of A.
The following theorem makes it possible to find bases for the row and column
spaces of a matrix in row echelon form by inspection.
Theorem 6.2. If a matrix R is in row echelon form, then the row vectors
with the leading 1’s (the nonzero row vectors) form a basis for the row space
of R, and the column vectors with the leading 1’s of the row vectors form a
- 32 -
Department of Mathematics, College of Science, Jazan University
The problem of finding a basis for the column space of a matrix A is com-
plicated by the fact that an elementary row operation can alter its column
space. However, the good news is that elementary row operations do not alter
dependence relationships among the column vectors. The fact that elemen-
tary row operations are reversible that they also preserve linear independence
among column vectors will help the cause, as it is summarized in the following
theorem.
(b). A given set of column vectors of A forms a basis for the column space
Exercise 6.4. Find a basis and dimension of row space, column space and
- 33 -
Department of Mathematics, College of Science, Jazan University
- 34 -
Department of Mathematics, College of Science, Jazan University
1 3 −3 2 1 3 −3 2
∼ 0 −10 10 −5 ∼ 0 1 −1 − 21
0 5 −5 4 R2 −3R1 , R3 +R1 0 5 −5 4 −1
R
10 2
1 3 −3 2 1 3 −3 2
1
∼ 0 1 −1
−2 ∼ 0 1 −1
− 21 = R.
13
0 0 0 2 R3 −5R3
0 0 0 1
The matrix R is the reduced echelon form of matrix B.
Hence the set {(1, 3, −3, 2), (0, 1, −1, 45 ), (0, 0, 0, 1)} forms a basis for row
space of B and the set {(2, 3, −1), (1, −1, 2), (0, 1, 2)}forms a basis for col-
umn space of A.
Clearly dim(row space of B) = 3 and dim(column space of B) = 3.
For null space we consider RX = 0.
x1
1 3 −3 2 0
0 1 −1 − 1 x2 = 0
2 x3
0 0 0 1 0
x4
x1 + 3x2 − 3x3 + 2x4 = 0
x2 − x3 − 21 x4 = 0
⇒
x3 = a ∈ R
x4 = 0
x1 = 0
x2 = a
⇒
x3 = a
x4 = 0
x1 0 0
x2 a 1
⇒ x3 = a = a 1 .
x4 0 0
It shows that the set {(0, 1, 1, 0)} forms a basis for null space of B and
dim(null space of B) = 1.
- 35 -
Department of Mathematics, College of Science, Jazan University
Exercise 6.5. Find a basis and the dimension for the solution space of fol-
x1 + x 2 − x3 = 0
(i). −2x1 − x2 + 2x3 = 0
−x1 + x3 = 0
3x1 + x2 + x3 + x4 = 0
(ii).
5x1 − x2 + x3 − x4 = 0
Solution: Part (i). Let the augment matrix for the given system is,
1 1 −1
A = −2 −1 2
−1 0 1
We first reduce matrix A to echelon form.
1 1 −1 1 1 −1 1 1 −1
A = −2 −1
2 ∼ 0 1 0 ∼ 0 1 0 = R.
−1 0 1 0 1 0 0 0 0
- 36 -
Department of Mathematics, College of Science, Jazan University
x1 =a
⇒ x2 =0
x3 =a
x1 a 1
⇒ x2 = 0 = a 0 .
x3 a 1
It shows that the set {(1, 0, 1)} forms a basis for solution space of given sys-
tem of linear equations and dim(solution space) = 1.
Part (ii). Let the augment matrix for the given system is,
3 1 1 1
A=
5 −1 1 −1
We first reduce matrix A to echelon form.
3 1 1 1 −2 2 0 2
A= ∼
5 −1 1 −1 5 −1 1 −1 R1 −R2
1 −1 0 −1 1 −1 0 −1
∼ ∼
5 −1 1 −1 −1 R1 0 4 1 4 R2 −5R1
2
1 −1 0 −1
∼ = R.
0 1 14 1 1 R2
4
- 37 -
Department of Mathematics, College of Science, Jazan University
− 14 a − 41 a − 14
x1 0 0
x2 − 1 a − b − 1 a −b −1 −1
⇒ 4
x3 =
= 4 + = a 4 + b .
a a 0 1 0
x4 b 0 b 0 1
It shows that the set {(− 41 , − 14 , 1, 0), (0, −1, 0, 1)} forms a basis for solution
space of given system of linear equations and dim(solution space) = 2.
- 38 -
Department of Mathematics, College of Science, Jazan University
Exercise 6:
Question 1: Find a basis and dimension for the row space, column space
and null space for the following matrices.
2 −1
(a). A = .
1 0
−2 0 −2 1
(b). B = .
3 0 3 0
1 −1 0
(c). C = −1 1 1 .
2 −2 2
Question 2: Find a basis and the dimension for the solution space of fol-
lowing homogeneous systems of linear equations.
x1 + x2 = 0
(a).
−2x1 − x2 = 0
x1 + 2x2 − x3 = 0
(b). 2x1 + 4x2 + x3 = 0
−x1 − 2x2 =0
x1 − x2 + 3x3 = 0
(c).
−3x1 − 2x2 + x3 = 0
- 39 -
Department of Mathematics, College of Science, Jazan University
7 Linear Transformations
Recall that a function is a rule that associates with each element of a set A
one and only one element in a set B. If f associates the element b with the
element a, then we write f (a) = b and we say that b is the image of a under
f or value of f at a. The set A is called the domain of f and the set B the
codomain of f . The subset of the codomain that consists of all images of
points in the domain is called the range of f.
For a common function the domain and codomain are simply sets, but in this
text we will be concerned with functions for which the domain and codomain
are vector spaces.
the following two properties hold for all vectors u, v ∈ V and any scalar a.
mapping such that T (v) = 0 for every v ∈ V. Then it is easy to see that T is
Example 7.3. If V is a vector space and k is any scalar, then the mapping
- 40 -
Department of Mathematics, College of Science, Jazan University
and
(a). T (0) = 0.
0.
- 41 -
Department of Mathematics, College of Science, Jazan University
= T (a1 u1 ) + T (a2 u2 + . . . + an un )
..
.
Exercise 7.5. Decide which of the following functions are linear transfor-
mation?
(iv). T : Mm×n (R) → Mn×m (R) defined as, T (A) = AT (transpose of A).
a b a b
(v). T : M2×2 (R) → R defined as, T = = ad − bc.
c d c d
Solution: Part (i). For any vector u = (x, y) ∈ R2 and any scalar a,
- 42 -
Department of Mathematics, College of Science, Jazan University
- 43 -
Department of Mathematics, College of Science, Jazan University
The set of all vectors in W which are images under T is called range (or
R(T ) = {T (u)| u ∈ V }.
- 44 -
Department of Mathematics, College of Science, Jazan University
Also,
Part (b). Again T (0) = 0 ∈ R(T ), which shows that R(T ) is nonempty as
and T (v) = w2 .
rank(T ) + nullity(T ) = n.
be a linear transformation. Describe its kernel and range and give the di-
mension of each.
- 45 -
Department of Mathematics, College of Science, Jazan University
a b 0 a+b
Solution: It should be clear that T = ⇒ =
c d 0 c+d
0
⇒ b = −a and d = −c. The kernel of T is therefore all matrices of the
0
form
a −a 1 −1 0 0
=a +c .
c −c 0 0 1 −1
1 −1 0 0
The two matrices and are not scalar multiples of each
0 0 1 −1
other, so they must be linearly independent. Therefore the dimension of
Ker(T ) is two (nullity(T ) = 2).
a 2 a 0
Now suppose that we have any vector ∈ R . Clearly T =
b b 0
a
, so the range of T is all of R2 . Thus the dimension of R(T ) is two
b
(rank(T ) = 2).
- 46 -
Department of Mathematics, College of Science, Jazan University
Exercise 7:
be a linear transformation. Describe its kernel and range sets and find rank
and nullity of T.
- 47 -
Department of Mathematics, College of Science, Jazan University
AX = λX
to be an eigenvector corresponding to λ.
3 0 1
Example 8.1. For the matrix A = , the vector X = is an
8 −1 2
eigenvector of A and λ = 3 is an eigenvalue of A, since,
3 0 1 3 1
AX = = = 3 = λX.
8 −1 2 6 2
- 48 -
Department of Mathematics, College of Science, Jazan University
Exercise 8.2. Find the eigenvalues and eigenvectors for all following matri-
ces,
3 0
(i). A = .
8 −1
1 5
(ii). B = .
3 −1
3 2 4
(iii). C =
2 0 2 .
4 2 3
λ−3 0
⇒ =0
−8 λ + 1
⇒ (λ − 3)(λ + 1) = 0 ⇒ λ = 3 or λ = −1,
are the required eigenvalues of A.
For every λ we find its own vector(s).
Case 1: λ = −1.
Here the matrix
−4 0
−1I2 − A =
−8 0
- 49 -
Department of Mathematics, College of Science, Jazan University
λ − 1 −5
⇒ =0
−3 λ + 1
⇒ (λ − 1)(λ + 1) − 15 = 0 ⇒ λ2 − 16 = 0 ⇒ λ = ±4,
are the required eigenvalues of B.
For every λ we find its own vector(s).
Case 1: λ = −4.
- 50 -
Department of Mathematics, College of Science, Jazan University
Case 2: λ = 4.
Here the matrix
3 −5
4I2 − B =
−3 5
can be row reduced to the matrix:
" 5 #
1 −
R= 3 .
0 0
λ − 3 −2 −4
⇒ −2 λ −2 =0
−4 −2 λ − 3
- 51 -
Department of Mathematics, College of Science, Jazan University
0 0 0
The eigenvectors corresponding to the eigenvalue −1 are the non-zero solu-
1
tions to the equation x1 + x2 + x3 = 0.
2
The solutions to the equation are the vectors of the form
1 1
x1 −2t − s −2 −1
⇒ x2 = t = t 1 + s 0 .
x3 s 0 1
Case 2: λ = 8.
Here the matrix
5 −2 −4
8I3 − C = −2 8 −2
−4 −2 5
can be row reduced to the matrix:
1 0 −1
1
R = 0 1 − .
2
0 0 0
The eigenvectors corresponding to the eigenvalue 8 are the non-zero solu-
tions to the equations
x1 − x3 = 0
- 52 -
Department of Mathematics, College of Science, Jazan University
1
x2 − x3 = 0.
2
The solutions to the equation are the vectors of the form
t
1
x1
x2 = 1 1
t = t .
x3 2 2
t 1
- 53 -
Department of Mathematics, College of Science, Jazan University
Exercise 8:
- 54 -
Department of Mathematics, College of Science, Jazan University
CH4 + O2 −→ CO2 + H2 O.
X1 CH4 + X2 O2 −→ X3 CO2 + X4 H2 O.
From looking at the equation, it can be seen that there are only three ele-
ments; Carbon, Hydrogen, and Oxygen, that make up the compounds in the
equation. An equation can now be produced for each element by determin-
ing how many times that element shows up in the other compounds. For
Carbon, one Carbon appears in X1 and one appears in X3 so the two can
be set to each other resulting in the first equation X1 = X3 . For Hydrogen,
four appear in X1 and two appear in X4 so the corresponding equation is
4X1 = 2X4 . For Oxygen, there are two that appear in X2 , two in X3 , and
one in X4 so the following equation can be created 2X2 = 2X3 + X4 . There
are now three equations for each element and the system of equations can be
formed:
- 55 -
Department of Mathematics, College of Science, Jazan University
Carbon : X1 = X3
X1 − X3 = 0
4X1 − 2X4 = 0
2X2 − 2X3 − X4 = 0
It can now be seen that these values can be placed into a matrix. From linear
algebra we have learned that it is possible to reduce a matrix to produce
specific values for a given variable in the equation set. The simplest method
for doing so is by using the reduced row echelon form technique to solve for
the value of the coefficients.
1 0 −1 0
A = 4 0 0 −2 .
0 2 −2 −1
- 56 -
Department of Mathematics, College of Science, Jazan University
1
X1 = X4
2
X2 = X4
1
X3 = X4 .
2
To obtain full integers (generally preferred for chemists when doing lab work)
the least common denominator between the equations must be found which
in this case it is simple with X4 = 2. This results in the final solution to the
system of equations and these values can be placed into the original chemical
equation.
X1 = 1
X2 = 2
X3 = 1
X4 = 2.
Thus,
CH4 + 2O2 −→ CO2 + 2H2 O.
- 57 -
Department of Mathematics, College of Science, Jazan University
Exercise 9:
(a). C2 H5 OH + O2 −→ CO2 + H2 O.
- 58 -
Department of Mathematics, College of Science, Jazan University
References
[1] Howard Anton, Chris Rorres, Elementery linear Algebra, John Wiley
& Sons, Inc., 2010.
- 59 -