0% found this document useful (0 votes)
85 views59 pages

Linear Algebra Notes For CS, Aug 2024

Uploaded by

ama.339955
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views59 pages

Linear Algebra Notes For CS, Aug 2024

Uploaded by

ama.339955
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Linear Algebra (Math-326)

Lecture Notes
Dr. Ali Koam and Dr. Azeem Haider
August 17, 2024

c 2022, Department of Mathematics, Jazan University, Jazan


All Rights Reserved

1
Department of Mathematics, College of Science, Jazan University

Contents
1 Real Vector Spaces 6

2 Subspaces 11
2.1 Building Subspaces . . . . . . . . . . . . . . . . . . . . . . . . 14

3 Linear Combination and Span 17

4 Linear Independence and Dependence 20

5 Basis and Dimension 23


5.1 Basis and Dimension of Subspaces . . . . . . . . . . . . . . . . 28

6 Row Space, Column Space and Null Space 31


6.1 Basis for row space, column space and null space . . . . . . . 32
6.2 Basis and dimension for Solution Space . . . . . . . . . . . . . 36

7 Linear Transformations 40
7.1 Kernel and Range . . . . . . . . . . . . . . . . . . . . . . . . . 44

8 Eigenvalues and eigenvectors 48


8.1 Computing Eigenvalues and Eigenvectors . . . . . . . . . . . . 48

9 Some Applications of Linear Algebra 55


9.1 Balancing a Chemical reaction . . . . . . . . . . . . . . . . . . 55

-2-
Department of Mathematics, College of Science, Jazan University

To Students

Mid Term Exams:


The first mid-term exam will be given during the 6th week. The second
mid-term exam will be given during the 10th week.

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

Linear Algebra is used in many areas as: engineering, Computer sciences,


medicine, business, statistics, physics, mathematics, numerical analysis and
humanities. The reason: many real world systems consist of many parts
which interact linearly. Analysis of such systems involves the notions and the
tools from Linear Algebra. Our main goal in writing these notes was to give
to the student a concise overview of the main concepts, ideas and results that
usually are covered in the first course on linear algebra for mathematicians.
These notes should be viewed as a supplementary notes to a regular book
for linear algebra [1].

-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

1 Real Vector Spaces


In general, scalars for a vector space can be any field. Vector spaces with
scalars from real numbers are called real vector spaces. The word ”vector”
means an element of a vector space.
For this course we will be concerned exclusively with real vector spaces and
by scalars we mean real numbers.
Definition 1.1. Let V be any nonempty set on which two operations are de-
fined: addition in V , and multiplication by scalars. By scalar multiplication
we mean a rule for associating with each scalar a and each element u ∈ V an
element a.u. We call V a vector space, if the following axioms are satisfied
for all elements u, v, w ∈ V and scalars a and b.
1. u + v ∈ V

2. u + (v + w) = (u + v) + w

3. u + v = v + u

4. 0 ∈ V (zero vector) such that 0 + u = u + 0 = u for all u ∈ V.

5. For any u ∈ V, we have −u ∈ V such that u + (−u) = (−u) + u = 0.

6. a.u ∈ V for any scalar a and any u ∈ V.

7. (a + b).u = a.u + b.u

8. a.(u + v) = a.u + a.v

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

(iv). If a.u = 0, then either a = 0 or u = 0.


Proof. Part (i). For any vector u ∈ V we can write,

0.u + 0.u = (0 + 0).u = 0.u.

Now by axiom 4 we have −0.u ∈ V , add it both sides.

[0.u + 0.u] + (−0.u) = 0.u + (−0.u)

0.u + [0.u + (−0.u)] = 0


0.u + 0 = 0
0.u = 0.
Part (ii). is exercise.
Part (iii). For any vector u ∈ V we can write,

(−1).u + u = (−1).u + 1.u = (−1 + 1).u = 0.u = 0.

(−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,

a−1 (a.u) = a−1 (0)

-7-
Department of Mathematics, College of Science, Jazan University

(a−1 a).u = 0
1.u = 0
u = 0.

Now we see some questions related to vector spaces.

Question 1: Show that the set V = R2 = {(x, y)| x, y ∈ R} forms a


vector space with usual addition and scalar multiplication.

Solution: Consider u = (x1 , y1 ), v = (x2 , y2 ) and w = (x3 , y3 ) in V = R2


and scalars a and b.
1. u + v = (x1 , y1 ) + (x2 , y2 ) = (x1 + x2 , y1 + y2 ) ∈ V.
2. u+(v +w) = (x1 , y1 )+[(x2 , y2 )+(x3 , y3 )] = (x1 +(x2 +x3 ), y1 +(y2 +y3 )) =
((x1 + x2 ) + x3 , (y1 + y2 ) + y3 ) = (u + v) + w.
3. u + v = (x1 , y1 ) + (x2 , y2 ) = (x1 + x2 , y1 + y2 ) = (x2 + x1 , y2 + y1 ) = v + u.
4. o = (0, 0) ∈ V such that o + u = (0, 0) + (x1 , y1 ) = (x1 + 0, y1 + 0) =
(x1 , y1 ) = u, also u + o = u.
5. For any u = (x, y) ∈ V we have −u = (−x, −y) ∈ V such that
u + (−u) = (x, y) + (−x, −y) = (0, 0) = o, also (−u) + u = o.
6. For any u = (x, y) ∈ V and a scalar a, a.u = a.(x, y) = (ax, ay) ∈ V.
7. (a + b).u = (a + b).(x, y) = ((a + b)x, (a + b)y) = (ax + bx, ay + by) =
(ax, ay) + (bx, by) = a.(x, y) + b.(x, y) = a.u + b.u.
8. a.(u + v) = a.(x1 + x2 , y1 + y2 ) = (ax1 + ax2 , ay1 + ay2 ) = (ax1 , ay1 ) +
(ax2 , ay2 ) = a.(x1 , y1 ) + a.(x2 , y2 ) = a.u + a.v.
9. a.(b.u) = a.[b.(x, y)] = a.(bx, by) = (a(bx), a(by)) = ((ab)x, (ab)y) =
(ab).(x, y) = (ab).u.
10. 1.u = 1.(x, y) = (1.x, 1.y) = (x, y) = u.
Hence V = R2 is a vector space.

Question 2: Show that the set V = R2 = {(x, y)| x, y ∈ R} is not a


vector space with usual addition and given scalar multiplication.
For a vector u = (x, y) ∈ V and a scalar a.

(i). a.(x, y) = (ay, ax),

(ii). a.u = (ax, y),

-8-
Department of Mathematics, College of Science, Jazan University

(iii). a.u = (ax, 0).

Solution: Part (i). Consider u = (x, y) ∈ V such that x 6= y.


Now 1.(x, y) = (1 × y, 1 × x) = (y, x) 6= u.
Axiom 10 fails to hold, hence V is not a vector space with given scalar mul-
tiplication.
Part (ii). Consider u = (x, y) ∈ V such that y 6= 0 and two scalars a and b.
Now (a + b).u = (a + b).(x, y) = ((a + b)x, y) = (ax + bx, y)
but a.u + b.u = a.(x, y) + b.(x, y) = (ax, y) + (bx, y) = (ax + bx, 2y). Implies
(a + b).u 6= a.u + b.u, axiom 7 fails, hence V is not a vector space with given
scalar multiplication.
Part (iii). Similar to Part (i). (exercise).

Question 3: Consider V = R2 = {(x, y)| x, y ∈ R} with following addi-


tion and scalar multiplication.
For a vector u = (x1 , y1 ), v = (x2 , y2 ) ∈ V and a scalar a we define,

u + v = (x1 + x2 + 1, y1 + y2 + 1), a.u = (ax1 , ay1 ).

(i). If u = (−1, 2), v = (2, −4) ∈ V , then find 3u + 2v.

(ii). Is V a vector space with given addition and scalar multiplication. If


no, state which axiom fails.

(iii). Show that o = (−1, −1) is the additive identity.

Solution: Part (i).

3u+2v = 3(−1, 2)+2(2, −4) = (−3, 6)+(4, −8) = (−3+4+1, 6+(−8)+1) = (2, −1).

Part (ii). Consider any u = (x, y) ∈ V and two scalars a and b.


Now (a + b).u = (a + b).(x, y) = ((a + b)x, (a + b)y) = (ax + bx, ay + by)
but a.u+b.u = a.(x, y)+b.(x, y) = (ax, ay)+(bx, by) = (ax+bx+1, ay+by+1).
Implies (a + b).u 6= a.u + b.u, axiom 7 fails, hence V is not a vector space
with given addition.
Part (iii). Consider any u = (x, y) ∈ V and 0 = (−1, −1) ∈ V .
Now o + u = (−1, −1) + (x, y) = (−1 + x + 1, −1 + y + 1) = (x, y) = u.
Similarly we can see that u + o = u. Hence o = (−1, −1) is the additive
identity in V with given addition. 2

-9-
Department of Mathematics, College of Science, Jazan University

Exercise 1:

Question 1: Show that the set V = C = {x + y ι̇| x, y ∈ R} forms a


vector space with usual addition and scalar multiplication of complex num-
bers.
Hint: Solution is similar to Question 1. In fact, R2 and C has same additive
structure.

Question 2: Show that the set V = {(x, y)| x, y ≥ 0} ⊆ R2 is not a


vector space with usual addition and usual scalar multiplication.

Question 3: Consider the set V = R2 = {(x, y)| x, y ∈ R} with usual


addition and given scalar multiplication; a.(x, y) = (ax, ay − 1).

(i). For u = (−3, 1) and v = (4, −2) ∈ V. Find 1.u + (−1).v.

(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

Example 2.5. We know that the sum of two symmetric n × n matrices is


symmetric and that a scalar multiple of a symmetric n × n matrix is symmet-
ric. Thus, the set of symmetric n × n matrices is closed under addition and
scalar multiplication and hence is a subspace of Mn×n . Similarly, the sets of
upper triangular matrices, lower triangular matrices, and diagonal matrices
are subspaces of Mn×n .
Example 2.6. Recall that a polynomial is a function that can be expressed
in the form
p(x) = a0 + a1 x + · · · + an xn
where a0 , a1 , · · · , an are constants. Now the sum of two polynomials is a
polynomial and that a constant times a polynomial is a polynomial. Thus, the
set of all polynomials R[x] is closed under addition and scalar multiplication
and hence is a subspace of F (−∞, ∞). We will denote this space by P∞ .
Question 1: Decide which of the following subsets are subspaces of R2 .
(a). W1 = {(a, 0)| a ∈ R}.

(b). W2 = {(a, b)| a + b = 1}.


Solution: Part (a). Clearly W1 is non-empty, since (0, 0) ∈ W1 .
Take any two elements (a1 , 0), (a2 , 0) ∈ W1 , where a1 , a2 ∈ R.
Now (a1 , 0) + (a2 , 0) = (a1 + a2 , 0) ∈ W1 as a1 + a2 ∈ R.
Also for any (a, 0) ∈ W1 and a scalar k, we have k.(a, 0) = (ka, 0) ∈ W1 .
Hence W1 is a subspace of R2 .

- 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 2: Decide which of the following subsets are subspaces of R3 .

(a). W1 = {(a, b, c)| c = a + b}.

(b). W2 = {(a, b, 1)| a, b ∈ R}.

Solution: Part (a). Since (0, 0, 0) ∈ W1 gives W1 is non-empty.


Take any (a1 , b1 , c1 ), (a2 , b2 , c2 ) ∈ W1 , where c1 = a1 + b1 and c2 = a2 + b2 .
As c1 + c2 = (a1 + b1 ) + (a2 + b2 ) = (a1 + a2 ) + (b1 + b2 ), therefore (a1 , b1 , c1 ) +
(a2 , b2 , c2 ) = (a1 + a2 , b1 + b2 , c1 + c2 ) ∈ W1 .
Also, for any scalar k and a (a, b, c) ∈ W1 we have c = a + b or kc = ka + kb
which gives k.(a, b, c) = (ka, kb, kc) ∈ W1 . Hence W1 is a subspace of R3 .
Part (b). For any two elements (a1 , b1 , 1), (a2 , b2 , 1) ∈ W2 ,
we have (a1 , b1 , 1) + (a2 , b2 , 1) = (a1 + a2 , b1 + b2 , 2) 6∈ W2 .
Hence W2 is not a subspace of R3 .

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].

2.1 Building Subspaces


The following theorem provides a useful way of creating a new subspace from
known subspaces.
Theorem 2.7. If W1 , W2 , · · · , Wr are subspaces of a vector space V , then
r
T
the intersection of these subspaces Wi = W1 ∩ W2 ∩ . . . ∩ Wr is also a
i=1
subspace of V .
r
T
Proof. Let W = Wi . Then W is non-empty because each Wi contain the
i=1
zero vector of V , and hence 0 ∈ W. Now it remains to show that W is closed
under addition and scalar multiplication.
For any u, v ∈ W ⇒ u, v ∈ Wi for all i. Since these subspaces are all closed
under addition, implies u + v ∈ Wi for all i and hence u + v ∈ W .
Similarly, for any scalar a and a vector u ∈ W ⇒ u ∈ Wi for all i. Since
these subspaces are all closed under scalar multiplication, implies a.u ∈ Wi
for all i and hence a.u ∈ W.

- 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.

Theorem 2.8. Let U and W be any two subspaces of a vector spaces V .


Then
U + W = {u + w| u ∈ U, w ∈ W }
is also a subspace of V , called sum of subspaces.

Proof. Since 0 ∈ U and 0 ∈ W, so 0 + 0 = 0 ∈ U + W which gives U + W is


non empty.
For any u1 + w1 , u2 + w2 ∈ U + W, where u1 , u2 ∈ U and w1 , w2 ∈ W .
Now (u1 + w1 ) + (u2 + w2 ) = (u1 + u2 ) + (w1 + w2 ) ∈ U + W as u1 + u2 ∈ U
and w1 + w2 ∈ W.
Also for any scalar k and any u + w ∈ U + W, where u ∈ U and w ∈ W.
We have k.(u + w) = ku + kw ∈ U + W as ku ∈ U and kw ∈ W.
Hence U + W us also a subspace of V .

Definition 2.2. A vector space V is called a direct sum of two subspaces


U and W , if

1. U + W = V.

2. U ∩ W = {0}.

We write it as, V = U ⊕ W .

Example 2.9. Consider two subspaces W1 = {(a, 0)| a ∈ R} and W2 =


{(o, b)| b ∈ R} of R2 . Then R2 = W1 ⊕ W2 .

- 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

3 Linear Combination and Span


Sometimes we will want to find the smallest subspace of a vector space V
that contains all of the vectors in some set of interest. The following section
will help us to do that.

Definition 3.1. If w is a vector in a vector space V , then w is said to be a

linear combination of the vectors v1 , v2 , . . . , vn in V if w can be expressed

in the form,

w = a1 v1 + a2 v2 + a3 v3 + . . . + an vn ,

where a1 , a2 , a3 , . . . , an are scalars. These scalars are called coefficients of

the linear combination.

Example 3.1. Consider the vectors u = (1, 2, −1) and v = (6, 4, 2) in R3 .

Show that w = (9, 2, 7) is a linear combination of u and v and that w0 =

(4, −1, 8) is not a linear combination of u and v.

Solution: For w to be a linear combination of u and v, there must be scalars,


say a and b such that; w = a.u + b.v that is,

(9, 2, 7) = a(1, 2, −1) + b(6, 4, 2)

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.

Theorem 3.2. If S = {v1 , v2 , v3 , . . . , vn } is a nonempty set of vectors in a

vector space V, then:

(a). The set W of all possible linear combinations of the vectors in S is a

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

those vectors, also contains W.

Proof. Part (a). Let W be the set of all possible linear combinations of the

vectors in S, since 0 = 0.v1 + 0.v2 + . . . + 0.vn ∈ W which shows that W is

non empty. Now we must show that W is closed under addition and scalar

multiplication. To prove closure under addition, let

u = a1 v1 + a2 v2 + . . . + an vn and v = b1 v1 + b2 v2 + . . . + bn vn ∈ W,

where a1 , a2 , . . . , an and b1 , b2 , . . . , bn are any scalars. The sum,

u + v = (a1 v1 + a2 v2 + . . . + an vn ) + (b1 v1 + b2 v2 + . . . + bn vn )

- 18 -
Department of Mathematics, College of Science, Jazan University

= (a1 + b1 )v1 + (a2 + b2 )v2 + . . . + (an + bn )vn ∈ W.

Now for any scalar k and a vector u = a1 v1 + a2 v2 + . . . + an vn ∈ W we have,

k.u = k.(a1 v1 + a2 v2 + . . . + an vn ) = (ka1 )v1 + (ka2 )v2 + . . . + (kan )vn ∈ W.

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.

Since W 0 is closed under addition and scalar multiplication, it contains all

linear combinations of the vectors in S and hence contains W .

Definition 3.2. The subspace of a vector space V that is formed from all

possible linear combinations of the vectors in a nonempty set S is called the

span of S, and we say that the vectors in S span that subspace.

If S = {v1 , v2 , v3 , . . . , vn }, then we denote the span of S by,

span(S) = {a1 v1 + a2 v2 + . . . + an vn | a1 , a2 , . . . , an are any scalars}.

Example 3.3. The vectors e1 = (1, 0, 0), e2 = (0, 1, 0) and e3 = (0, 0, 1)

spans R3 . That is, any vector v = (a, b, c) ∈ R3 can be written as, v =

ae1 + be2 + ce3 .

In general, the vectors e1 = (1, 0, 0, . . . , 0), e2 = (0, 1, 0, . . . , 0), . . . en =

(0, 0, 0, . . . , 1) spans Rn .

Example 3.4. The vectors 1, x, x2 , . . . , xn spans Pn (x) (the set of all poly-

nomials with degree at most n).

- 19 -
Department of Mathematics, College of Science, Jazan University

4 Linear Independence and Dependence


In this section we will consider the question of whether the vectors in a given
set are interrelated in the sense that one or more of them can be expressed
as a linear combination of the others.

Definition 4.1. If S = {v1 , v2 , v3 , . . . , vn } is a nonempty set of vectors in a

vector space V, then the equation,

a1 v1 + a2 v2 + . . . + an vn = 0

has at least one solution, namely, a1 = a2 = a3 = . . . = an = 0.

We call this the trivial solution.

If this is the only solution, then S is said to be a linearly independent set.

If there are solutions in addition to the trivial solution, then S is said to be

a linearly dependent set.

Example 4.1. The set, S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} is linearly indepen-

dent in R3 , because if we consider the equation,

a1 (1, 0, 0) + a2 (0, 1, 0) + a3 (0, 0, 1) = (0, 0, 0),

then it has only trivial solution, that is a1 = a2 = a3 = 0.

In general, the set S = {(1, 0, 0, . . . , 0), (0, 1, 0, . . . , 0), . . . (0, 0, 0, . . . , 1)} is

linearly independent in Rn .

Example 4.2. The vectors S = {1, x, x2 , . . . , xn } is also linearly independent

in the vector space Pn (x).


Question 1: Decide which of the following sets are linearly independent in
the vector space R2 .

- 20 -
Department of Mathematics, College of Science, Jazan University

(a). S1 = {(5, −1), (0, 3)}.

(b). S2 = {(1, −2), (5, −10)}.

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

which implies a = b = 0. Hence S1 is linearly independent in R2 .


Part (b). Consider the equation a(1, −2) + b(5, −10) = (0, 0) for any scalars
a and b. After simplification we get,

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:

Question 1: Show that the vector w = (−2, 1) is a linear combination


of vectors u = (1, 2) and v = (0, −3) in the vector space R2 .
Question 2: Decide which of the following sets are linearly independent in
the vector space R3 .

(a). S1 = {(1, 2, −1), (2, 0, 3)}.

(b). S2 = {(2, 0, −2), (0, −1, −5), (4, 1, 1)}.

Question 3: Decide which of the following sets are linearly independent in


the vector space P2 (x).

(a). S1 = {3 − x + 2x2 , 1 − x2 , 2x + 5x2 }.

(b). S2 = {2 + x, 1 − x2 , 1 + x + x2 }.

Question 4: Let V be a vector space and u, v, w ∈ V − {0} such that w is a


linear combination of vectors u and v. Then show that the set S = {u, v, w}
is linearly dependent.

- 22 -
Department of Mathematics, College of Science, Jazan University

5 Basis and Dimension


We usually think of a line as being one-dimensional, a plane as two-dimensional,
and the space around us as three dimensional. It is the primary goal of this
section to make this intuitive notion of dimension precise.

Definition 5.1. Let S be subset of a vector space V, then S is called a basis

for V if the following two conditions hold:

(a). S is linearly independent.

(b). S spans V .

Example 5.1. The set, S = {(1, 0, 0), (0, 1, 0), (0, 0, 1)} forms a basis for

vector pace R3 , called standard basis.

In general, the set S = {(1, 0, 0, . . . , 0), (0, 1, 0, . . . , 0), . . . (0, 0, 0, . . . , 1)} forms

standard basis for vector space Rn .

Example 5.2. The set of vectors S = {1, x, x2 , . . . , xn } forms standard

basis for the vector space Pn (x).


       
 1 0
  0 1   0 0   0 0 
 

Example 5.3. The vectors S =  , , ,


 0 0

0 0 1 0 0 1 

forms standard basis for the vector space M2×2 .

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

polynomials R[x] is not finite.

- 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.

Theorem 5.6. Let V be a finite-dimensional vector space, and let set S =

{v1 , v2 , v3 , . . . , vn } be any basis for V .

(a). If a set has more than n vectors, then it is linearly dependent.

(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.

Definition 5.2. The dimension of a finite-dimensional vector space V is the

number of vectors in a basis for V . We denote it as, dim(V ).

The zero vector space is defined to have dimension zero.

Example 5.8.

dim(Rn ) = n

dim(Pn (x)) = n + 1

dim(Mm×n (R)) = m × n.

Example 5.9. (Infinite dimensional vector spaces)

The vector space R∞ and the vector space R[x] are infinite dimensional.

- 24 -
Department of Mathematics, College of Science, Jazan University

The following theorem is called plus minus theorem.

Theorem 5.10. Let S be a nonempty set of vectors in a vector space V.

(a). If S is a linearly independent set, and if v is a vector in V that is outside

of span(S), then the set S ∪ {v} is still linearly independent.

(b). If v is a vector in S that is expressible as a linear combination of other

vectors in S, then the set span(S)=span(S − {v}).

In general, to show that a set of vectors {v1 , v2 , v3 , . . . , vn } is a basis for a


vector space V , we must show that the vectors are linearly independent and
span V . However, if we happen to know that V has dimension n, then it suf-
fices to check either linear independence or spanning the remaining condition
will hold automatically. This is the content of the following theorem.

Theorem 5.11. Let V be an n-dimensional vector space, and let

S = {v1 , v2 , v3 , . . . , vn } ⊆ V . Then S is a basis for V if and only if S is

linearly independent or S spans V .

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.

Theorem 5.12. Let S be a finite set of vectors in a finite-dimensional vector

space V.

(a). If S spans V but is not a basis for V, then S can be reduced to a basis

for V by removing appropriate vectors from S.

- 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

be enlarged to a basis for V by inserting appropriate vectors into S.

For the proofs of above theorems please read book [1].

Exercise 5.13. Decide which of the following set of vectors forms a basis

for corresponding vector spaces.

(i). S1 = {(1, −2), (−1, 3)} ⊂ R2 .

(ii). S2 = {(1, 2), (2, 3), (2, 4)} ⊂ R2 .

(iii). S3 = {(1, 2, 3), (4, 5, 6)} ⊂ R3 .

(iv). S4 = {(1, 2, 1), (3, −2, 0), (−1, 1, 1)} ⊂ R3 .

(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 
 

Solution: Part (i). As |S1 | = 2 = dim(R2 ). We first see that S1 is linearly


independent? Take a(1, −2) + b(−1, 3) = (0, 0) for any scalars a and b.
Implies (a − b, −2a + 3b) = (0, 0), which gives a − b = 0 and −2a + 3b = 0,
or a = b using in the second equation, we get −2a + 3a = 0 ⇒ a = 0 and
hence b = 0. Which shows that S1 is linearly independent and by Theorem
5.11, forms a basis for R2 .
Note: In the case where number of vectors in a set is equal to the dimen-
sion of the space Rn or Pn (x), we can verify linearly independence of sets
by taking determinant of matrix whose rows are entries in the vectors. For
1 −2
example in above part we can take, = 1 6= 0. Hence S1 is linearly
−1 3
independent and rest follows as above.

- 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

5.1 Basis and Dimension of Subspaces


We conclude this section with a theorem that relates the dimension of a
vector space to the dimensions of its subspaces.

Theorem 5.14. If W is a subspace of a finite-dimensional vector space V,

then:

(a). W is also finite-dimensional.

(b). dim(W ) ≤ dim(V ).

(c). W = V if and only if dim(W ) = dim(V ).


For the proof of above theorem please read book [1].

Exercise 5.15. Find a basis and dimension for the following subspaces of

corresponding vector spaces.

(i). W1 = {(a, b)| a + b = 0} ⊆ R2 .

(ii). W2 = {(a, b, c)| a + 2b = c} ⊆ R3 .

(iii). W3 = {a + bx + cx2 | b = c} ⊆ P2 (x).


  
 a b
 

(iv). W4 =  | a + d = b + c ⊆ M2×2 (R).
 

 c d
 

Solution: Part (i). For any vector (a, b) ∈ W1 we have a + b = 0 ⇒ a = −b,


which gives,
(a, b) = (−b, b) = b(−1, 1),
implies W1 =span{(−1, 1)} also {(−1, 1)} is linearly independent and hence
it forms a basis for W1 . Clearly dim(W1 ) = 1.
Part (ii). For any vector (a, b, c) ∈ W2 we have a + 2b = c, which gives,
(a, b, c) = (a, b, a + 2b) = (a, 0, a) + (0, b, 2b) = a(1, 0, 1) + b(0, 1, 2),

- 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,

a + bx + cx2 = a + bx + bx2 = (a) + (bx + bx2 ) = a(1) + b(x + x2 ),

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.

(a). S1 = {(7, 2), (−1, 5)} ⊆ R2 .

(b). S2 = {(1, 0, −2), (0, −1, −7), (4, 1, 0)} ⊆ R3 .

(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.

(a). W1 = {(a, b)| a = b} ⊆ R2 .

(b). W2 = {(a, b, c)| a = b − c} ⊆ R3 .


  
a b
(c). W3 = | a + d = 0 ⊂ M2×2 (R).
c d

- 30 -
Department of Mathematics, College of Science, Jazan University

6 Row Space, Column Space and Null Space


In this section we will study some important vector spaces that are associated
with matrices. Our work here will provide us with a deeper understanding
of the relationships between the solutions of a linear system and properties
of its coefficient matrix.
For an m × n matrix,
 
a11 a12 . . . a1n
 a21 a22 . . . a2n 
A =  .. ..  .
 
..
 . . ... . 
am1 am2 . . . amn

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

in Rm are called column vectors of the matrix A.

Example 6.1. Let  


 1 2 −1 
A= .
3 4 2

- 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

Definition 6.1. If A is an m × n matrix, then the subspace of Rn spanned

by the row vectors of A is called the row space of A, and the subspace of Rm

spanned by the column vectors of A is called the column space of A. The

solution space of the homogeneous system of equations AX = 0, which is a

subspace of Rn , is called the null space of A.

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

basis for the column space of R.


Proof is omitted.
Since for any matrix A, the elementary row operations do not change the row
space of a matrix, so we can find a basis for the row space of A by finding a
basis for the row space of any row echelon form of 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.

Theorem 6.3. If A and B are row equivalent matrices, then:

(a). A given set of column vectors of A is linearly independent if and only

if the corresponding column vectors of B are linearly independent.

(b). A given set of column vectors of A forms a basis for the column space

of A if and only if the corresponding column vectors of B form a basis

for the column space of B.


Proof is omitted.
Following exercise will elaborate the whole procedure to find the basis for
row space, column space and null space.

Exercise 6.4. Find a basis and dimension of row space, column space and

null space for the following matrices.


 
 1 2 3 
 
(i). A =  4 5 6  .
 
7 8 9
 
 2 1 −1 0 
 
(ii). B = 
 3 −1 1 1 .

 
−1 2 −2 2

- 33 -
Department of Mathematics, College of Science, Jazan University

Solution: Part (i). We first reduce given matrix A to echelon form.


   
1 2 3 1 2 3
A= 4 5 6  ∼  0 −3 −6 
7 8 9 0 −6 −12 R2 −4R1 , R3 −7R1
   
1 2 3 1 2 3
∼ 0 1 2  ∼ 0 1 2  = R.
0 −6 −12 −1 R2 0 0 0 R3 +6R2
3

The matrix R is the reduced echelon form of matrix A.


Hence the set {(1, 2, 3), (0, 1, 2)} forms a basis for row space of A and the set
{(1, 4, 7), (2, 5, 8)} forms a basis for column space of A.
Clearly dim(row space of A) = 2 and dim(column space of A) = 2.
For null space we consider RX = 0 instead of AX = 0 as both systems leads
to same solution space (null space).
    
1 2 3 x1 0
 0 1 2   x2  =  0 
0 0 0 x3 0

 x1 + 2x2 + 3x3 = 0
⇒ x2 + 2x3 = 0
x3 = a ∈ R


 x1 = a
⇒ x2 = −2a
x3 = a

     
x1 a 1
⇒  x2  =  −2a  = a  −2  .
x3 a 1
It shows that the set {(1, −2, 1)} forms a basis for null space of A and
dim(null space of A) = 1.

Part (ii). We first reduce given matrix B to echelon form.


   
2 1 −1 0 1 3 −3 2
B =  3 −1 1 1  ∼  3 −1 1 1 
−1 2 −2 2 −1 2 −2 2 R1 +R3

- 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

6.2 Basis and dimension for Solution Space


Now basis for the solution space of any homogeneous system of linear equa-
tions can be achieved by finding the basis for the null space of corresponding
augmented matrix of the system, as shown in the following exercise.

Exercise 6.5. Find a basis and the dimension for the solution space of fol-

lowing homogeneous systems of linear equations.

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

For basis of solution space (null space) we consider RX = 0 instead of


AX = 0 as both systems leads to same solution space.
    
1 1 −1 x1 0
 0 1 0   x2  =  0 
0 0 0 x3 0

 x1 + x2 − x3 = 0
⇒ x2 = 0
x3 = a ∈ R

- 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

For basis of solution space (null space) we consider RX = 0 instead of


AX = 0 as both systems leads to same solution space.
 
  x 1  
1 −1 0 −1  x2  0
1
  =
0 1 4 1  x3  0
x4


 x1 − x2 − x4 = 0
x2 + 14 x3 + x4 = 0



 x3 = a ∈ R
x4 = b ∈ R



 x1 = − 14 a
x2 = − 41 a − b



 x3 = a
x4 = b

- 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.

Definition 7.1. If T : V → W is a function from a vector space V to a

vector space W, then T is called a linear transformation from V to W if

the following two properties hold for all vectors u, v ∈ V and any scalar a.

(i). T (a.u) = a.T (u)

(ii). T (u + v) = T (u) + T (v)

If V = W , then the linear transformation T is called a linear operator on

the vector space V.

Example 7.1. Let V and W be any two vector spaces and T : V → W be a

mapping such that T (v) = 0 for every v ∈ V. Then it is easy to see that T is

a linear transformation called the zero transformation.

Example 7.2. Let V be any vector space. The mapping T : V → V defined

by T (v) = v is a linear transformation, called the identity operator on V.

Example 7.3. If V is a vector space and k is any scalar, then the mapping

T : V → V given by T (u) = k.u is a linear operator on V, for if a is any

- 40 -
Department of Mathematics, College of Science, Jazan University

scalar and if u and v are any vectors in V, then

T (u + v) = k.(u + v) = k.u + k.v = T (u) + T (v)

and

T (a.u) = k.(a.u) = (ka).u = a.(k.u) = a.T (u).

If k < 1, then T is called the contraction of V with factor k, and if k > 1,

then it is called the dilation of V with factor k.

The following theorem describes the basic properties of vector spaces.

Theorem 7.4. If T : V → W is a linear transformation, then

(a). T (0) = 0.

(b). T (u − v) = T (u) − T (v), for any u, v ∈ V.

(c). T (a1 u1 + a2 u2 + . . . + an un ) = a1 T (u1 ) + a2 T (u2 ) + . . . + an T (un ),

for any scalars a1 , a2 , . . . an and vectors u1 , u2 . . . , un .

Proof. Part (a). Since T (0 + 0) = T (0) ⇒ T (0) + T (0) = 0 + T (0) ⇒ T (0) =

0.

Part (b). For any two vectors u and v in V we have,

T (u−v) = T (u+(−1)v) = T (u)+T ((−1)v) = T (u)+(−1)T (v) = T (u)−T (v).

- 41 -
Department of Mathematics, College of Science, Jazan University

Part (c). For any scalars a1 , a2 , . . . an and vectors u1 , u2 . . . , un .

T (a1 u1 + a2 u2 + . . . + an un ) = T ((a1 u1 ) + (a2 u2 + . . . + an un ))

= T (a1 u1 ) + T (a2 u2 + . . . + an un )
..
.

= T (a1 u1 ) + T (a2 u2 ) + . . . + T (an un )

= a1 T (u1 ) + a2 T (u2 ) + . . . + an T (un ).

Exercise 7.5. Decide which of the following functions are linear transfor-

mation?

(i). T : R2 → R2 defined as, T (x, y) = (−y, x).

(ii). T : R3 → R2 defined as, T (x, y, z) = (x + z, y + z).

(iii). T : R2 → R2 defined as, T (x, y) = (x + 1, y).

(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,

T (a.u) = T (ax, ay) = (−ay, ax) = a(−y, x) = aT (x, y) = aT (u).

Also for any two vectors u = (x1 , y1 ), v = (x2 , y2 ) ∈ R2 ,

T (u + v) = T (x1 + x2 , y1 + y2 ) = (−y1 − y2 , x1 + x2 ) = (−y1 , x1 ) + (−y2 , x2 )

- 42 -
Department of Mathematics, College of Science, Jazan University

= T (x1 , y1 ) + T (x2 , y2 ) = T (u) + T (v).


Hence T is a linear transformation.

Part (ii). For any vector u = (x, y, z) ∈ R3 and any scalar a,


T (a.u) = T (ax, ay, az) = (ax+az, ay+az) = a(x+z, y+z) = aT (x, y, z) = aT (u).
Also for any two vectors u = (x1 , y1 , z1 ), v = (x2 , y2 , z2 ) ∈ R2 ,
T (u+v) = T (x1 +x2 , y1 +y2 , z1 +z2 ) = ((x1 + x2 ) + (z1 + z2 ), (y1 + y2 ) + (z1 + z2 ))
= (x1 +z1 , y1 +z1 )+(x2 +z2 , y2 +z2 ) = T (x1 , y1 , z1 )+T (x2 , y2 , z2 ) = T (u)+T (v).
Hence T is a linear transformation.

Part (iii). For any vector u = (x, y) ∈ R2 and any scalar a 6= 1,

T (a.u) = T (ax, ay) = (ax + 1, ay)


but
a.T (u) = aT (x, y) = a(x + 1, y) = (ax + a, ay)
⇒ T (a.u) 6= a.T (u). Hence T is not a linear transformation.

Part (iv). We use some elementary properties of transpose of matrices to


show that T is a linear transformation.
For any matrix A ∈ Mm×n (R) and any scalar a,
T (a.A) = (a.A)T = a.AT = a.T (A).
Also for any two matrices A, B ∈ Mm×n (R),
T (A + B) = (A + B)T = AT + B T = T (A) + T (B).
 
1 2
Part (v). For the matrix A = ∈ M2×2 (R) and any scalar a = 2,
3 4
 
2 4
T (a.A) = T ( ) = (2)(8) − (4)(6) = −8
6 8
but  
1 2
a.T (A) = 2T ( ) = 2(−2) = −4.
3 4
⇒ T (a.u) 6= a.T (u). Hence T is not a linear transformation.

- 43 -
Department of Mathematics, College of Science, Jazan University

7.1 Kernel and Range

Definition 7.2. If T : V → W is a linear transformation, then the set of

vectors in V which T maps on 0 ∈ W is called kernel of T and is denoted

by, ker(T ). That is,

ker(T ) = {u ∈ V | T (u) = 0}.

The set of all vectors in W which are images under T is called range (or

image) of T and is denoted by R(T ) or Im(T ). That is,

R(T ) = {T (u)| u ∈ V }.

Example 7.6. Let T : V → W be zero linear transformation. Since T maps

every element of V into 0 ∈ W , it follows that ker(T ) = V and R(T ) = {0}.

Example 7.7. Let T : V → V be a linear operator. Then T (u) = u for

every u ∈ V, hence ker(T ) = {0} and R(T ) = V.


In above examples one can see that all ker(T ) and R(T ) are subspaces. This
is a consequence of the following general theorem.

Theorem 7.8. If T : V → W is a linear transformation, then;

(a). ker(T ) is a subspace of V .

(b). R(T ) is a subspace of W .

Proof. Part (a). Since T (0) = 0 ⇒ 0 ∈ ker(T ), hence ker(T ) is nonempty.

For any two vectors u, v ∈ ker(T ) and a scalar a.

T (u + v) = T (u) + T (v) = 0 + 0 = 0 ⇒ u + v ∈ ker(T ).

- 44 -
Department of Mathematics, College of Science, Jazan University

Also,

T (a.u) = a.T (u) = a(0) = 0 ⇒ a.u ∈ ker(T ).

It shows that ker(T ) is a subspace of V .

Part (b). Again T (0) = 0 ∈ R(T ), which shows that R(T ) is nonempty as

it contains at least zero element.

For any two elements w1 , w2 ∈ R(T ) we have u, v ∈ V such that T (u) = w1

and T (v) = w2 .

Now w1 + w2 = T (u) + T (v) = T (u + v) ∈ R(T ), also for any scalar a,

a.w1 = a.T (u) = T (a.u) ∈ R(T ). Hence R(T ) is a subspace of W .

Definition 7.3. Let T : V → W be a linear transformation. If the range of

T is finite-dimensional, then its dimension is called the rank of T denoted

by rank(T ) and if the kernel of T is finite-dimensional, then its dimension is

called the nullity of T denoted by nullity(T ).


The proof of following theorem is optional and can be seen in [1].

Theorem 7.9. If T : V → W is a linear transformation from an n-dimensional

vector space V to a vector space W , then

rank(T ) + nullity(T ) = n.

Exercise 7.10. Let T : M2×2 (R) → R2 defined by,


   
 a b   a + b 
T   =  
c d c+d

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:

Question 1: Let T : V → R be a linear transformation and T (u) =


3, T (v) = −2 for some u, v ∈ V. Then find the value of T (7.u + 3.v).
Question 2: Determine which of the following functions are linear transfor-
mation?

(a). T : R2 → R2 defined as; T (a, b) = (a, b2 ).

(b). T : R3 → R2 defined as; T (a, b, c) = (a − b, b − c).

(c). T : R2 → R3 defined as; T (a, b) = (a, b, ab).


 
a b
(d). T : M2×2 (R) → R defined as, T = a + d.
c d

Question 3: Let T : M2×2 (R) → R defined by,


 
a b
T =a+d
c d

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

8 Eigenvalues and eigenvectors


In this chapter we will focus on classes of scalars and vectors known as
eigenvalues and eigenvectors, terms derived from the German word eigen,
meaning own. In the early 1900s it was applied to matrices and matrix trans-
formations, and today it has applications in such diverse fields as computer
graphics, mechanical vibrations, heat flow, population dynamics, quantum
mechanics, and economic.
First we will define the notions of eigenvalue and eigenvector and discuss
some of their basic properties.

Definition 8.1. If A is an n × n matrix, then a nonzero vector X ∈ Rn is

called an eigenvector of A, if AX is a scalar multiple of X; that is,

AX = λX

for some scalar λ. The scalar λ is called an eigenvalue of A, and X is said

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

8.1 Computing Eigenvalues and Eigenvectors


To obtain a general procedure for finding eigenvalues and eigenvectors of an
n × n matrix A, note that the equation AX = λX can be rewritten as,

(λIX − AX) = (λI − A)X = 0,

- 48 -
Department of Mathematics, College of Science, Jazan University

where I is the n × n identity matrix.


For a nonzero eigenvector X, the above equation gives,
det(λI − A) = 0. (8.1)
This is called the characteristic equation of A.

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

Solution: Part (i). Consider the characteristic equation, det(λI − A) = 0.


    
1 0 3 0
⇒ det λ − =0
0 1 8 −1

λ−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

can be row reduced to the matrix:


 
1 0
R= .
0 0

The eigenvectors corresponding to the eigenvalue −1 are the non-zero solu-


tions to the equation x1 = 0. The solutions to the equation are the vectors
of the form      
x1 0 0
= =t
x2 t 1
Case 2: λ = 3.
Here the matrix  
0 0
3I2 − A =
−8 4
can be row reduced to the matrix:
" 1 #
1 −
R= 2 .
0 0

The eigenvectors corresponding to the eigenvalue 3 are the non-zero solu-


1
tions to the equation x1 − x2 = 0. The solutions to the equation are the
2
vectors of the form
  " 1 # " 1 #
x1 t
= 2 =t 2 .
x2 t 1
Part (ii). Consider the characteristic equation, det(λI − B) = 0.
    
1 0 1 5
⇒ det λ − =0
0 1 3 −1

λ − 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

Here the matrix  


−5 −5
−4I2 − B =
−3 −3
can be row reduced to the matrix:
 
1 1
R= .
0 0

The eigenvectors corresponding to the eigenvalue −4 are the non-zero so-


lutions to the equation x1 + x2 = 0. The solutions to the equation are the
vectors of the form
     
x1 −t −1
= =t .
x2 t 1

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

The eigenvectors corresponding to the eigenvalue 3 are the non-zero solu-


5
tions to the equation x1 − x2 = 0. The solutions to the equation are the
3
vectors of the form
  " 5 # " 5 #
x1 t
= 3 =t 3 .
x2 t 1
Part (iii). Consider the characteristic equation, det(λI − C) = 0.
    
1 0 0 3 2 4
⇒ det λ  0 1 0  −  2 0 2  = 0
0 0 1 4 2 3

λ − 3 −2 −4
⇒ −2 λ −2 =0
−4 −2 λ − 3

- 51 -
Department of Mathematics, College of Science, Jazan University

⇒ λ3 −6λ2 −15λ−8 = 0 ⇒ (λ+1)(λ2 −7λ−8) = 0 ⇒ (λ+1)(λ+1)(λ−8) = 0


⇒ λ = −1(twice) or λ = 8,
are the required eigenvalues of C.
For every λ we find its own vector(s).
Case 1: λ = −1.

Here the matrix  


−4 −2 −4
−1I3 − C =  −2 −1 −2 
−4 −2 −4
can be row reduced to the matrix:
 1 
1 1
R =  0 02 0  .
 

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:

Question 1: Find all the eigenvalues and corresponding eigenvectors for


the following matrices.
 
−1 1
(a). A = .
−1 1
 
3 0
(b). A = .
−4 −2
 
−5 1
(c). A = .
7 1

- 54 -
Department of Mathematics, College of Science, Jazan University

9 Some Applications of Linear Algebra


9.1 Balancing a Chemical reaction
Linear Algebra extends its reaches into all parts of science and mathematics.
In chemistry, one of linear algebras techniques (being the reduced row eche-
lon form) can be used to solve one of inescapable tasks of balancing chemical
equations. Balancing chemical equations is fundamental when it comes to
laboratory work as the correct ratios of reagents and products is vital to most
chemical reactions. This task is taught and drilled into the head of students
who study chemistry. The further a student studies chemistry the easier the
task becomes but it can still be tedious and takes up valuable laboratory
time. It can however be observed that when balancing a chemical equation,
a system of equations can be formed from the process.

To make it simple let’s start with a simple chemical reaction.

Exercise 9.1. Balance the following chemical reaction:

CH4 + O2 −→ CO2 + H2 O.

Solution: We are trying to determine the values of the coefficients in front


of each compound so to start lets give each coefficient a letter value of
X1 , X2 , X3 , X4 .

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

Hydrogen : 4X1 = 2X4

Oxygen : 2X2 = 2X3 + X4

This system of equations can be rewritten in standard form:

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

The row reduced echelon form of this matrix is:


−1
 
 1 0 0 2 
A =  0 1 0 −1  .
 
 −1 
0 0 1
2
With the reduced row echelon form solved for it can be seen that X4 is a free
variable and the solutions can be written as:

- 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:

Question 1: Balance the following Chemical equations by using linear sys-


tems:

(a). C2 H5 OH + O2 −→ CO2 + H2 O.

(b). N aOH + H2 SO4 −→ N a2 SO4 + 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.

[2] T. S. Blyth, E. F. Robertson, Basic Linear Algebra,, Second Edition,


Springer Undergraduate Mathematics Series (Springer-Verlag 2002)

[3] T. S. Blyth, E. F. Robertson, Further Linear Algebra, Springer Under-


graduate Mathematics Series (Springer-Verlag 2002)

[4] R. Kaye, R. Wilson, Linear Algebra, Oxford Science Publications (OUP


1998)

- 59 -

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy