Lab Manual - NEP - MATDSCP 6.1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

MATDSCP 6.

1: Practical on Linear Algebra and Integral Calculus

Subject Code MATDSCP 6.1 IA Marks 25

Number of Lecture Hours/Week 04 Exam marks 25

Total Number of Lecture Hours 60 Credits 02

End Semester Examination: 04 Hrs

Course Objectives: This course will enable students to:

● Learn Free and Open Source Software (FOSS) tools for computer programming
● Solve problem on Linear Algebra and Integral Calculus studied in MATDSCT 6.1 by
using FOSS software’s.
● Acquire knowledge of applications of Linear Algebra and Integral Calculus through
FOSS
Special Note:

Practical/Lab Work to be performed in Computer Lab (FOSS)Suggested


Software’s: Maxima/Scilab /Python/R.

List of Experiments:

1. Vector spaces: Expressing a vector as a linear combination


of given set of vectors.
2. Examples on linear dependence and independence of vectors.
3. Basis and Dimension – illustrative examples.
4. Verifying whether a given transformation is linear or not.
5. Finding matrix of a linear transformation.
6. Finding linear transformation of a given matrix.
7. Verification of rank-nullity theorem.
8. Evaluation of the integrals using gamma function and Beta
function.
9. Verification of Green’s theorem.
10.Verification of Gauss divergence theorem.
11. Verification of Stokes’ theorem.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 1


FORMAT OF QUESTION PAPER OF VI SEMESTER (MATDSCP 6.1)

Question Marks for Maximum


each sub marks for
no. Topic No. of sub divisions divisions the question
To be
To be Set answered

I UNIT-1 2 1 4 4

II UNIT-2 2 1 4 4

III UNIT-3 2 1 4 4

IV UNIT-4 2 1 4 4

VIVA 4

RECORD 5

TOTAL 25

NOTE: Distribution of marks for manual work and execution will be done proportionately.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 2


LAB-1: Expressing a vector as a linear combination of given set of vectors.
Linear combination of vectors
Definition: Let V be a vector space over a field F.
An expression of the form
c1⍺1 + c2⍺2 + … + cn⍺n where the scalars ci’s ∈ F is called a linear combination of the vectors ⍺1 ,⍺2 ,
. . . , ⍺n ∈ V.
Problems:

1) Express (3,7,-4) as a linear combination of the vectors (1,2,3),(2,3,7) and (3,5,6).

Solution: Let
(3,7, −4) = a(1,2,3) + b(2,3,7) + c(3,5,6) ………………..(A)
⇒ (3,7, −4) = (a + 2b + 3c, 2a + 3b + 5c, 3a + 7b + 6c)
⇒ 3 = a + 2b + 3c …………………..(1)
7 = 2a + 3b + 5c………………………(2)
−4 = 3a + 7b + 6c…………………….(3)
Now solving (1),(2) and (3) we obtain the values of a, b and c
(2)-2(1) gives,
1 = −𝑏 − 𝑐………………….(4)
(3) − 3(1) gives,
−13 = b − 3c ………………(5)
Now (4)+(5) gives,
−12 = −4c ⇒ 𝑐 = 3
Putting 𝑐 = 3 in (4) we get 𝑏 = −4.
Now, putting 𝑏 = −4 𝑎𝑛𝑑 𝑐 = 3 in (1) we get 𝑎 = 2
Therefore equation (A) becomes
(3,7, −4) = 2(1,2,3) + (−4)(2,3,7) + 3(3,5,6) which is the required linear combination.
Maxima Program:
kill(all)$
v:[3,7,-4]$
v1:[1,2,3]$
v2:[2,3,7]$
v3:[3,5,6]$
e:a*v1+b*v2+c*v3$
[globalsolve:true,programmode:true]$
h:linsolve([e[1]=v[1],e[2]=v[2],e[3]=v[3]],[a,b,c]);
V:a*v1+b*v2+c*v3$
if (V=v)then
print("The linear combination of vector",v,"=",a,v1,"+",b,v2,"+",c,v3)
else
print("v is not a linear combination of v1,v2,v3")$
Output:

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 3


2) Express the vector (2,-5,4) as a linear combination of the vectors (1,-3,2) and (2,-1,1).
3) Express the vector (1,7,-4) as a linear combination of the vectors (1,-3,2) and (2,-1,1).

4) Express (2,-5,3) as a linear combination of the vectors (1,-3,2), (2,-4,-1) and (1,-5,7).

5) Express the vector (3,-1,1,-2) as a linear combination of the vectors

(1,1,0,-1), (1,1,-1,0) and (1,-1,0,0).

Maxima program:
kill(all)$
v:[3,-1,1,-2]$
v1:[1,1,0,-1]$
v2:[1,1,-1,0]$
v3:[1,-1,0,0]$
e:a*v1+b*v2+c*v3;
[globalsolve:true,programmode:true]$
h:linsolve([e[1]=v[1],e[2]=v[2],e[3]=v[3]],[a,b,c]);
V:a*v1+b*v2+c*v3$
if (V=v)then
print("The linear combination of vector ",v,"=",a,v1,"+",b,v2,"+",c,v3)
else
print("v is not a linear combination of v1,v2,v3")$

Output:

LAB-2: Examples on linear dependence and independence of vectors.


Linear independence and linear dependence of vectors

Definition:

Linear Dependence: Let V be a vector space over a field F.

A finite set {⍺1 ,⍺2 , . . . , ⍺n} of vectors of V is said to be linearly dependent if there exists scalars c1, c2,
…, cn ∈ F not all zero such that c1⍺1 + c2⍺2 + … + cn⍺n = 0.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 4


Linear Independence: Let V be a vector space over a field F. A finite set {⍺1 ,⍺2 , . . . , ⍺n} of vectors of V
is said to be linearly independent

if c1⍺1 + c2⍺2 + … + cn⍺n = 0 ⇒ c1=0, c2=0, …, cn=0.

Note:A subset S={(x1 ,x2 ,x3),(y1 ,y2 ,y3),(z1 ,z2 ,z3)} of V3(R) is linearly
dependent iff
x1 𝑥2 𝑥3
|𝑦1 𝑦2 𝑦3 | = 0
𝑧1 𝑧2 𝑧3
Problems:

1) Show that the vectors (1,1,-1), (2,-3,5) and (-2,1,4) of R3 are linearly independent.

Solution: Consider

1 1 −1
| 2 −3 5 | = 1(−12 − 5) − 1(8 + 10) − 1(2 − 6)
−2 1 4

= −17 − 18 + 4 = −31 ≠ 0

Hence the given vectors are linearly independent.

Maxima program:

kill(all)$
A:matrix([1,1,-1],[2,-3,5],[-2,1,4]);
D:determinant(A);
if (D=0) then
disp("The given vectors are Linearly Dependent")
else
disp("The given vectors are Linearly Independent")$
Output:

2) Examine whether the set of vectors {(1,1,2), (-3,1,0), (1,-1,1), (1,2,-3)} are linearly
independent or linearly dependent.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 5


Solution:
Consider the linear combination of the given vectors
𝑎(1,1,2) + 𝑏(−3,1,0) + 𝑐 (1, −1,1) + 𝑑(1,2, −3) = (0,0,0)
⇒ (𝑎 − 3𝑏 + 𝑐 + 𝑑, 𝑎 + 𝑏 − 𝑐 + 2𝑑, 2𝑎 + 𝑐 − 3𝑑) = (0,0,0)

⇒ 𝑎 − 3𝑏 + 𝑐 + 𝑑 = 0……………………..(1)
⇒ 𝑎 + 𝑏 − 𝑐 + 2𝑑 = 0……………………..(2)
⇒ 2𝑎 + 𝑐 − 3𝑑 = 0…………………………(3)

(1)+3(2) gives, 4𝑎 − 2𝑐 + 7𝑑 = 0………………(4)


2(3)+(4) gives, 8𝑎 + 𝑑 = 0 ⇒ 𝑑 = −8𝑎
Choose 𝑎 = 𝑘 ≠ 0 ∈ 𝑅
⇒ 𝑑 = −8𝑘
From (3) we get, 𝑐 = −2𝑎 + 3𝑑 ⇒ 𝑐 = −26𝑘
From (2) we get, 𝑏 = −𝑎 + 𝑐 − 2𝑑 ⇒ 𝑏 = −11𝑘
Since 𝑘 ≠ 0, we get 𝑎 ≠ 0, 𝑏 ≠ 0, 𝑐 ≠ 0, 𝑑 ≠ 0.
Therefore the given vectors are linearly dependent.

Maxima program:
kill(all)$
v1:[1,1,2]$
v2:[-3,1,0]$
v3:[1,-1,1]$
v4:[1,2,-3]$
e:c1*v1+c2*v2+c3*v3+c4*v4$
h:linsolve([e[1]=0,e[2]=0,e[3]=0],[c1,c2,c3,c4]);
if (c1=0)and (c2=0) and (c3=0)and(c4=0) then
disp("The given vectors are Linearly Independent")
else
disp("The given vectors are Linearly Dependent")$

Output:

3) Examine whether the vectors (1,√2,1), (1,-√2,1) and (-1,0,1) of V3(R) are linearly
independent.

4) In V3(R) show that the set of vectors {(1,1,0), (1,3,2),(4,9,5)} are linearly dependent.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 6


5) Examine whether the set of vectors

{(1,2,1,2), (3,2,3,2),(-1,-3,0,4),(0,4,-1,-3)} are linearly dependent.

LAB-3: Basis and Dimension – illustrative examples.

BASIS AND DIMENSION


Definition:
Basis: A subset B of a vector space V over a field F is said to be a basis if
(i) B is linearly independent and (ii) B generates V.
Dimension: The number of elements in a basis is called the dimension of a vector space V.

Note: If a vector space V has a basis consisting of finite number of elements then the
vector space V is said to be finite dimensional vector space.

Note: (1) In a ‘n’ dimensional vector space V over a field F


(i) any (n+1) vectors of V are linearly dependent.
(ii) set containing (n-1) vectors do not generate V.
(2) In a n-dimensional vector space V(F), any n linearly independent vectors form a basis of V.

Problems:
(1) Show that the vectors (1,1,0), (0,1,0), (0,1,1) form a basis of R3
Solution: dim(R3)=3.
Let S={(1,1,0), (0,1,0), (0,1,1)}
⇒ |𝑆| = 3 = dim (R3 )
∴ S is linearly independent ⇒ S is a basis of R3
1 1 0
Consider, |A|=|0 1 0| = 1(1 − 0) − 1(0) + 0(0) = 1 ≠ 0
0 1 1
Therefore S is Linearly independent and hence form a basis of R3
Maxima program:
kill(all)$
A:matrix([1,1,0],[0,1,0],[0,1,1]);
D:determinant(A);
if(D=0)then

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 7


disp("The given vectors are Linearly Dependent and
hence not a basis.")
else
disp("The given vectors are Linearly Independent and
hence form a basis.")$
Output:

2) Show that the set of vectors {(1,2,3),(3,1,0),(-2,1,3)} is not a basis of R3.Determine the
dimension and basis of the subspace spanned by the given vectors.
1 2 3
Let A=[ 3 1 0],
−2 1 3
|A|= 1(3-0)-2(9-0)+3(3+2)
=3-18+15=0.
∴ The given set of vectors are Linearly dependent and hence not a basis of R3 .
1 2 3
Consider, A=[ 3 1 0] , 𝑅2 − 3𝑅1, 𝑅3 + 2𝑅1
−2 1 3
1 2 3
~ [0 −5 −9], 𝑅3 + 𝑅2
0 5 9
1 2 3
−1
~ [0 −5 −9], 5 𝑅2
0 0 0
1 2 3
~ [0 1 9/5]
0 0 0
There are 2 nonzero rows.
∴Rank of A=2.
Hence the dimension of the subspace is 2.
9
Basis of the subspace is {(1, 2, 3) , (0, 1, 5
)}.
Maxima program:
kill(all)$
A:matrix([1,2,3],[3,1,0],[-2,1,3]);
D:determinant(A);
if(D=0)then
disp("The given vectors are Linearly Dependent and hence do not form a basis")
else
disp("The given vectors are Linearly Independent and hence form a basis")$
r:rank(A)$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 8


print("Dimension of the subspace is=",r)$
e:echelon(A)$
disp("Subspace is generated by")$
for i:1 thru r do(disp(e[i]))$
Output:

3) Find the basis and dimension of the subspace spanned by the vectors
(2,-3,1), (3,0,1), (0,2,1), (1,1,1) of R3.
2 −3 1
Let 𝐴 = [3 0 1], 𝑅1 ↔ 𝑅4 ,
0 2 1
1 1 1
1 1 1
~ [3 0 1], 𝑅2 − 3𝑅1 , 𝑅4 − 2𝑅1
0 2 1
2 −3 1
1 1 1
~[ 0 −3 −2 ] , (−1/3)𝑅2
0 2 1
0 −5 −1
1 1 1
0 1 2/3
~[ ] , 𝑅3 − 2𝑅2, 𝑅4 + 5𝑅2,
0 2 1
0 −5 −1
1 1 1
0 1 2/3
~[ ], (−3)𝑅3 ,
0 0 −1/3
0 0 7/3
1 1 1
0 1 2/3
~[ ] , 𝑅4 + 7𝑅3
0 0 1
0 0 7/3
1 1 1
0 1 2/3
~[ ]
0 0 1
0 0 0
There are 3 non zero rows.
∴Rank of A=3.
Hence the dimension of the subspace is 3.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 9


2
Basis of the subspace is {(1, 1, 1), (0, 1, 3
), (0, 0, 1)}

Maxima program:
kill(all)$
A:matrix([2,-3,1],[3,0,1],[0,2,1],[1,1,1]);
r:rank(A)$
print("Dimension of the subspace is=",r)$
e:echelon(A)$
disp("Subspace is generated by")$
for i:1 thru r do(disp(e[i]))$
Output:

(4) Find the dimension and basis of the subspace generated by the vectors
1 −5 1 1 2 −4 1 −7
( ),( ),( ),( ) of the vector space of all 2x2
−4 2 −1 5 −5 7 −5 1
matrices over R.

LAB-4: Verifying whether a given transformation is linear or not.

LINEAR TRANSFORMATION
Definition:

Let U and V be finite dimensional vector spaces over the same field F.

A mapping T: U⟶ V is said to be a linear transformation if

(1) 𝑇(𝛼 + 𝛽) = 𝑇(𝛼) + 𝑇(𝛽) ∀𝛼, 𝛽 ∈ 𝑈


(2) 𝑇(𝑘. 𝛼) = 𝑘. 𝑇(𝛼) ∀𝛼 ∈ 𝑈 𝑎𝑛𝑑 𝑘 ∈ 𝐹.

OR

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 10


Definition:

Let U and V be finite dimensional vector spaces over the same field F.

A mapping T: U⟶ V is said to be a linear transformation if

𝑇(𝑎. 𝛼 + 𝑏. 𝛽) = 𝑎. 𝑇(𝛼) + 𝑏. 𝑇(𝛽) ∀𝛼, 𝛽 ∈ 𝑈 & 𝑎, 𝑏 ∈ 𝐹.

Problems:

1) Verify whether T: V2 (R) ⟶ V2 (R) defined by T(x, y) = (x + y, y) is a linear transformation.


Solution: Let 𝛼 = (𝑥1 , 𝑦1 ), 𝛽 = (𝑥2 , 𝑦2 ) ∈ V2 (R) and
𝛼 + 𝛽 = (𝑥1 + 𝑥2 , 𝑦1 + 𝑦2 ),
𝑇(𝛼 + 𝛽) = (𝑥1 + 𝑥2 + 𝑦1 + 𝑦2 , 𝑦1 + 𝑦2 ) ---------------(1)
𝑇(𝛼) = (𝑥1 + 𝑦1 , 𝑦1 )
𝑇(𝛽) = (𝑥2 + 𝑦2 , 𝑦2 )
𝑇(𝛼) + 𝑇(𝛽) = (𝑥1 + 𝑦1 + 𝑥2 + 𝑦2 , 𝑦1 + 𝑦2 ) ------------(2)
𝑇(𝑐. 𝛼) = (𝑐. 𝑥1 + 𝑐. 𝑦1 , 𝑐. 𝑦1 )-----------------(3)
𝑐. 𝑇(𝛼) = 𝑐. (𝑥1 + 𝑦1 , 𝑦1 )=(𝑐. 𝑥1 + 𝑐. 𝑦1 , 𝑐. 𝑦1 )------------(4)
We have (1)=(2) and (3)=(4)
Therefore T is a linear transformation.

Maxima program:
kill(all)$
T(x):=[x[1]+x[2], x[2]];
A:[a,b]$
B:[c,d]$
a1:T(A)+T(B);
a2:T(A+B);
p1:factor(T(k*A));
p2:k*T(A);
if (a1=a2 and p1=p2) then
print("The given mapping is a linear transformation")
else
print("The given mapping is not a linear transformation")$
Output:

2) Verify whether T: V3 (R) ⟶ V3 (R) defined by


T(x, y, z) = (x 2 + xy, xy, yz) is a linear transformation.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 11


Solution: Let 𝛼 = (𝑥1 , 𝑦1 , 𝑧1 ), 𝛽 = (𝑥2 , 𝑦2 , 𝑧2 ) ∈ V3 (R) and
𝛼 + 𝛽 = (𝑥1 + 𝑥2 , 𝑦1 + 𝑦2 , 𝑧1 + 𝑧2 ),
𝑇(𝛼 + 𝛽) = ((𝑥1 + 𝑥2 )2 + (𝑥1 + 𝑥2 )(𝑦1 + 𝑦2 ), (𝑥1 + 𝑥2 ) (𝑦1 + 𝑦2 ), (𝑦1 + 𝑦2 )(𝑧1 + 𝑧2 )) ------------
-----(1)
𝑇(𝛼) = (𝑥1 2 + 𝑥1 𝑦1 , 𝑥1 𝑦1 , 𝑦1 𝑧1 )
𝑇(𝛽) = (𝑥2 2 + 𝑥2 𝑦2 , 𝑥2 𝑦2 , 𝑦2 𝑧2 )
𝑇(𝛼) + 𝑇(𝛽) = (𝑥1 2 + 𝑥1 𝑦1 + 𝑥2 2 + 𝑥2 𝑦2 , 𝑥1 𝑦1 + 𝑥2 𝑦2 , 𝑦1 𝑧1 + 𝑦2 𝑧2 ) ---------------(2)

(1)≠(2)
Therefore T is not a linear transformation.

Maxima program:
kill(all)$
T(x):=[x[1]^2+x[1]*x[2],x[1]*x[2],x[2]*x[3]];
A:[a,b,c]$
B:[d,e,f]$
a1:T(A)+T(B);
a2:radcan(T(A+B));
p1:factor(T(k*A));
p2:factor(k*T(A));
if (a1=a2 and p1=p2) then
print("The given mapping is a linear transformation")
else
print("The given mapping is not a linear transformation")$
Output:

3) Verify whether T: R3 ⟶ R2 defined by


T(x, y, z) = (x + 2y − 3z, 4x − 5y + 6z) is a linear transformation.
Let 𝛼 = (𝑥1 , 𝑦1 , 𝑧1 ), 𝛽 = (𝑥2 , 𝑦2 , 𝑧2 ) ∈ V3 (R) and
𝛼 + 𝛽 = (𝑥1 + 𝑥2 , 𝑦1 + 𝑦2 , 𝑧1 + 𝑧2 ),
𝑇(𝛼 + 𝛽) = ((𝑥1 + 𝑥2 ) + 2(𝑦1 + 𝑦2 ) − 3(𝑧1 + 𝑧2 ), 4(𝑥1 + 𝑥2 ) − 5(𝑦1 + 𝑦2 ) + 6(𝑧1 + 𝑧2 ))
=(𝑥1 +𝑥2 + 2𝑦1 + 2𝑦2 − 3𝑧1 − 3𝑧2 , 4𝑥1 + 4𝑥2 − 5𝑦1 − 5𝑦2 , +6𝑧1 + 6𝑧2 )---------(1)
𝑇(𝛼) = (𝑥1 + 2𝑦1 − 3𝑧1 , 4𝑥1 − 5𝑦1 + 6𝑧1 )
𝑇(𝛽) = (𝑥2 + 2𝑦2 − 3𝑧2 , 4𝑥2 − 5𝑦2 + 6𝑧2 )

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 12


𝑇(𝛼) + 𝑇(𝛽) = (𝑥1 +𝑥2 + 2𝑦1 + 2𝑦2 − 3𝑧1 − 3𝑧2 , 4𝑥1 + 4𝑥2 − 5𝑦1 − 5𝑦2 , +6𝑧1 + 6𝑧2 ) -------------
--(2)
𝑇(𝑐. 𝛼) = (𝑐. 𝑥1 + 2𝑐. 𝑦1 − 3𝑐. 𝑧1 , 4𝑐. 𝑥1 − 5𝑐. 𝑦1 + 6𝑐. 𝑧1 )------------------------------(3)
𝑐. 𝑇(𝛼) = 𝑐. (𝑥1 + 2𝑦1 − 3𝑧1 , 4𝑥1 − 5𝑦1 + 6𝑧1 )
= (𝑐. 𝑥1 + 2𝑐. 𝑦1 − 3𝑐. 𝑧1 , 4𝑐. 𝑥1 − 5𝑐. 𝑦1 + 6𝑐. 𝑧1 )-------------------------------------------(4)
(1)=(2) and (3)=(4)
Therefore T is a linear transformation.

Maxima program:
kill(all)$
T(x):=[x[1]+2*x[2]-3*x[3],4*x[1]-5*x[2]+6*x[3]];
A:[a,b,c]$
B:[d,e,f]$
a1:T(A)+T(B);
a2:radcan(T(A+B));
p1:factor(T(k*A));
p2:factor(k*T(A));
if (a1=a2 and p1=p2) then
print("The given mapping is a linear transformation")
else
print("The given mapping is not a linear transformation")$
Output:

4) Verify whether T: V2 (R) ⟶ V3 (R) defined by


T(x, y) = (x + 3, 2y, x + y) is a linear transformation.
Solution: Let 𝛼 = (𝑥1 , 𝑦1 ), 𝛽 = (𝑥2 , 𝑦2 ) ∈ V2 (R) and
𝛼 + 𝛽 = (𝑥1 + 𝑥2 , 𝑦1 + 𝑦2 ),
𝑇(𝛼 + 𝛽) = (𝑥1 + 𝑥2 + 3,2(𝑦1 + 𝑦2 ), 𝑥1 + 𝑥2 + 𝑦1 + 𝑦2 ) -----------------(1)
𝑇(𝛼) = (𝑥1 + 3,2𝑦1 , 𝑥1 + 𝑦1 )
𝑇(𝛽) = (𝑥2 + 3,2𝑦2 , 𝑥2 + 𝑦2 )
𝑇(𝛼) + 𝑇(𝛽) = (𝑥1 + 𝑥2 + 6, 2𝑦1 + 2𝑦2 , 𝑥1 + 𝑥2 + 𝑦1 + 𝑦2 ) ---------------(2)
(1)≠(2)
Therefore T is not a linear transformation.

Maxima program:
kill(all)$
T(x):=[x[1]+3,2*x[2],x[1]+x[2]];

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 13


A:[a,b]$
B:[c,d]$
a1:T(A)+T(B);
a2:radcan(T(A+B));
p1:factor(T(k*A));
p2:factor(k*T(A));
if (a1=a2 and p1=p2) then
print("The given mapping is a linear transformation")
else
print("The given mapping is not a linear transformation")$
Output:

LAB-5: Finding matrix of a linear transformation.

MATRIX OF LINEAR TRANSFORMATION


Definition:
Matrix of linear transformation: Let T:U⟶V be a linear transformation from a finite dimensional
vector space U to a finite dimensional vector space V. Let the dimension of U and V be m and n
respectively. Also let
𝐵1 = {𝛼1 , 𝛼2 , … , 𝛼𝑚 } 𝑎𝑛𝑑 𝐵2 = {𝛽1 , 𝛽2 , … , 𝛽𝑛 } be the ordered basis of U and V respectively such
that 𝑇(𝛼𝑖 ) = 𝑎1𝑖 𝛽1 + 𝑎2𝑖 𝛽2 + ⋯ + 𝑎𝑛𝑖 𝛽𝑛

∴ 𝑇(𝛼1 ) = 𝑎11 𝛽1 + 𝑎21 𝛽2 + ⋯ + 𝑎𝑛1 𝛽𝑛


𝑇(𝛼2 ) = 𝑎12 𝛽1 + 𝑎22 𝛽2 + ⋯ + 𝑎𝑛2 𝛽𝑛
………………………………………..
𝑇(𝛼𝑚 ) = 𝑎1𝑚 𝛽1 + 𝑎2𝑚 𝛽2 + ⋯ + 𝑎𝑛𝑚 𝛽𝑛

Then the matrix formed by taking the transpose of the coefficient matrix

𝑎11 𝑎12 𝑎1𝑚


𝑎21 𝑎22 ⋯ 𝑎2𝑚
𝐴𝑇 = [ ⋮ ⋱ ⋮ ]
𝑎𝑛1 𝑎𝑛2 ⋯ 𝑎𝑛𝑚 𝑛×𝑚

is called the matrix of linear transformation T relative to the basis 𝐵1 and 𝐵2 .

Note: To every linear transformation T:U⟶V there is associated an 𝑛 × 𝑚 matrix where


dimension of U and V are m and n respectively.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 14


Problems:
1
1) Given 𝑇(𝑥, 𝑦, 𝑧) = (𝑥 − 𝑦 + 𝑧, 2𝑥 + 3𝑦 − 2 𝑧, 𝑥 + 𝑦 − 2𝑧), find the matrix of T relative
to the bases 𝐵1 = {(−1,1,0), (5, −1,2), (1,2,1)} and 𝐵2 = {(1,1,0), (0,0,1), (1,5,2)}

1
Solution: Given 𝑇(𝑥, 𝑦, 𝑧) = (𝑥 − 𝑦 + 𝑧, 2𝑥 + 3𝑦 − 2 𝑧, 𝑥 + 𝑦 − 2𝑧)
𝐵1 = {(−1,1,0), (5, −1,2), (1,2,1)}
T(-1,1,0)=(-2,1,0),
T(5,-1,2) =(8,6,0),
T(1,2,1) = (0,15/2,1).
Consider (−2,1,0) = 𝑐1 (1,1,0) + 𝑐2 (0,0,1) + 𝑐3 (1,5,2)-----(1)
Equation (1) gives,
𝑐1 + 𝑐3 = −2 ---------(a)
𝑐1 + 5𝑐3 = 1--------(b)
𝑐2 + 2𝑐3 = 0-------(c)
from (b)-(a), we get 4𝑐3 =3 ⟹ 𝑐3 =3/4,
if 𝑐3 =3/4 then we get 𝑐1 =-11/4 and 𝑐2 =-3/2
Similarly,
(8,6,0) = 𝑘1 (1,1,0) + 𝑘2 (0,0,1) + 𝑘3 (1,5,2)------(2)
Equation (2) gives,
𝑘1 + 𝑘3 = 8---------(a1)
𝑘1 + 5𝑘3 = 6--------(b1)
𝑘2 + 2𝑘3 = 0-------(c1)
from (b1)-(a1), we get 4𝑘3 =-2, ⟹ 𝑘3 =-1/2,
if 𝑘3 =-1/2 then 𝑘1 =17/2 and 𝑘2 =1
Now consider,
(0,15/2,1) = 𝑟1 (1,1,0) + 𝑟2 (0,0,1) + 𝑟3 (1,5,2)------(3)
Equation (3) gives,
𝑟1 + 𝑟3 = 0---------(a2)
𝑟1 + 5𝑟3 = 15/2--------(b2)
𝑟2 + 2𝑟3 = 1-------(c2)
from (b2)-(a2), we get 4𝑟3 =15/2, ⟹ 𝑟3 =15/8,
if 𝑟3 =15/8 then 𝑟1 =-15/8 and 𝑟2 =-11/4
Therefore the matrix of a linear transformation T is
−11 17 −15
𝑐1 𝑘1 𝑟1 4 2 8
−3 −11
𝐴 = [𝑐2 𝑘2 𝑟2 ] = 2
1 4
𝑐3 𝑘3 𝑟3 3×3 3 −1 15
[ 4 2 8 ]3×3
Maxima Program:
kill(all)$
T(x):=[x[1]-x[2]+x[3],2*x[1]+3*x[2]-(1/2)*x[3],x[1]+x[2]-2*x[3]];
u[1]:[-1,1,0]$
u[2]:[5,-1,2]$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 15


u[3]:[1,2,1]$
v[1]:[1,1,0]$
v[2]:[0,0,1]$
v[3]:[1,5,2]$
for i:1 thru 3 do(
eq[i]:v[1][i]*x+v[2][i]*y+v[3][i]*z)$
for k:1 thru 3 do(
soln:solve([eq[1]=T(u[k])[1],eq[2]=T(u[k])[2],eq[3]=T(u[k])[3]],[x,y,z]),
p[k]:ev(x,soln),
q[k]:ev(y,soln),
r[k]:ev(z,soln))$
print("The matrix of linear transformation is A:")$
A:matrix([p[1],p[2],p[3]],[q[1],q[2],q[3]],[r[1],r[2],r[3]]);

2) Find the matrix of linear transformation T:V2(R) ⟶ V3(R) defined by 𝑇(𝑥, 𝑦) = (−𝑥 +
2𝑦, 𝑦, −3𝑥 + 3𝑦) relative to the basis
B1={(1,2), (-2,1)} and B2={(-1,0,2), (1,2,3),(1,-1,-1)}.

Solution: Given 𝑇(𝑥, 𝑦) = (−𝑥 + 2𝑦, 𝑦, −3𝑥 + 3𝑦)


𝐵1 = {(1,2), (−2,1)}
𝑇(1,2) = (3,2,3)
𝑇(−2,1) = (4,1,9).
Consider (3,2,3) = 𝑐1 (−1,0,2) + 𝑐2 (1,2,3) + 𝑐3 (1, −1, −1) -------------- (1)
Equation (1) gives
−𝑐1 + 𝑐2 + 𝑐3 = 3-----------------------------------(a)
2𝑐2 − 𝑐3 = 2 -----------------------------------------(b)
2𝑐1 + 3𝑐2 − 𝑐3 = 3 ---------------------------------(c)
(c) + 2(a) gives 5𝑐2 + 𝑐3 = 9 ------------------- (d)
(b) + (d) gives 7𝑐2 =11 ⟹ 𝑐2 =11/7, 𝑐3 =8/7, 𝑐1 =-2/7

Consider (4,1,9) = 𝑘1 (−1,0,2) + 𝑘2 (1,2,3) + 𝑘3 (1, −1, −1) ------------- (2)


Equation (2) gives
−𝑘1 + 𝑘2 + 𝑘3 = 4 − − − − − − − − − −(𝑎1)
2𝑘2 − 𝑘3 = 1 − − − − − − − − − − − −(𝑏1)
2𝑘1 + 3𝑘2 − 𝑘3 = 9 − − − − − − − − − −(𝑐1)
(c1) + 2(a1) gives 5𝑘2 + 𝑘3 = 17 -------------- (d1)
(b1) + (d1) gives 7𝑘2 =18 ⟹ 𝑘2 =18/7, 𝑘3 =29/7, 𝑘1 =19/7.
Therefore the matrix of a Linear transformation is
−2 19
𝑐1 𝑘1 7 7
11 18
= [𝑐2 𝑘2 ] = 7 7
.
𝑐3 𝑘3 3×2 8 29
[7 7 ]3×2
Maxima Program:

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 16


kill(all)$
n:2; /*dimension of Domain*/
m:3; /*dimension of Codomain*/
T(x):=[-x[1]+2*x[2],x[2],-3*x[1]+3*x[2]];
u[1]:[1,2]$
u[2]:[-2,1]$
v[1]:[-1,0,2]$
v[2]:[1,2,3]$
v[3]:[1,-1,-1]$
for i:1 thru m do(
eq[i]:v[1][i]*x+v[2][i]*y+v[3][i]*z)$
for k:1 thru n do(
soln:solve([eq[1]=T(u[k])[1],eq[2]=T(u[k])[2],eq[3]=T(u[k])[3]],[x,y,z]),
p[k]:ev(x,soln),
q[k]:ev(y,soln),
r[k]:ev(z,soln));
print("The matrix of linear transformation is A:")$
A:matrix([p[1],p[2]],[q[1],q[2]],[r[1],r[2]]);

3)Find the matrix of linear transformation T:V3(R) ⟶ V2(R) defined by relative to the basis
𝑇(𝑥1 , 𝑥2 , 𝑥3 ) = (𝑥1 + 𝑥2 , 𝑥2 + 𝑥3 ) B1={(1,1,0), (1,0,1),(1,1,-1)} and B2={(2,-3), (1,4)}.

Solution: Given 𝑇(𝑥1 , 𝑥2 , 𝑥3 ) = (𝑥1 + 𝑥2 , 𝑥2 + 𝑥3 ) ,


B1={(1,1,0), (1,0,1),(1,1,-1)}
T(1,1,0) = (2,1)
T(1,0,1) = (1,1)
T(1,1,-1) =(2,0).
Consider (2,1) = x(2,-3) +y(1,4) ---------------(1)
Equation (1) gives
2x+y = 2 -------------- (a)
-3x+4y=1 ------------- (b)
(b) - 4(a), -11x=-7 → x=7/11 , y=8/11

Consider (1,1) = x(2,-3) +y(1,4) ---------------(2)


Equation (2) gives
2x+y = 1 --------------(a1)
-3x+4y=1 -------------(b1)
(b1)-4(a1), -11x=-3 → x=3/11 , y=5/11

Consider (2,0) = x(2,-3) +y(1,4) ---------------(3)


Equation (3) gives
2x+y = 2 -------------- (a2)
-3x+4y=0 ------------- (b2)
(b2)-4(a2), -11x=-8 → x=8/11 , y=6/11

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 17


7 3 8
11 11 11
Therefore the matrix of Linear transformation is 𝐴 = [8 5 6]
11 11 11 2×3

Maxima Program:
kill(all)$
n:3; /*dimension of Domain*/
m:2; /*dimension of Codomain*/
T(x):=[x[1]+x[2], x[2]+x[3]];
u[1]:[1,1,0]$
u[2]:[1,0,1]$
u[3]:[1,1,-1]$
v[1]:[2,-3]$
v[2]:[1,4]$
for i:1 thru m do(
eq[i]:v[1][i]*x+v[2][i]*y)$
for k:1 thru n do(
soln:solve([eq[1]=T(u[k])[1],eq[2]=T(u[k])[2]],[x,y]),
p[k]:ev(x,soln),
q[k]:ev(y,soln));
print("The matrix of linear transformation is A :")$
A:matrix([p[1],p[2],p[3]],[q[1],q[2],q[3]]);

4) Find the matrix of linear transformation T:R2⟶ R2 defined by 𝑇(𝑥, 𝑦) = (2𝑥 +


3𝑦, 4𝑥 − 5𝑦) w.r.t the standard basis.
Solution: Let 𝐵1 = {𝑒1 , 𝑒2 } and 𝐵2 = {𝑓1 , 𝑓2 } be the standard bases of 𝑅 2 .
Then 𝑒1 = (1,0) 𝑎𝑛𝑑 𝑒2 = (0,1), 𝑓1 = (1,0) 𝑎𝑛𝑑 𝑓2 = (0,1).
Given 𝑇(𝑥, 𝑦) = (2𝑥 + 3𝑦, 4𝑥 − 5𝑦)
𝑇(𝑒1 ) = 𝑇(1,0) = (2,4) = 2. 𝑓1 + 4. 𝑓2
𝑇(𝑒2 ) = 𝑇(0,1) = (3, −5) = 3. 𝑓1 − 5𝑓2
2 3
Hence the matrix of the linear transformation is 𝐴 = [ ]
4 −5 2×2
Maxima program:
kill(all)$
T(x):=[2*x[1]+3*x[2], 4*x[1]-5*x[2]];
u[1]:[1,0]$
u[2]:[0,1]$
v[1]:[1,0]$
v[2]:[0,1]$
for i:1 thru 2 do(
eq[i]:v[1][i]*x+v[2][i]*y)$
for k:1 thru 2 do(
soln:solve([eq[1]=T(u[k])[1],eq[2]=T(u[k])[2]],[x,y]),

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 18


p[k]:ev(x,soln),
q[k]:ev(y,soln))$
print("The matrix of linear transformation is A:")$
A:matrix([p[1],p[2]],[q[1],q[2]]);

LAB-6: Finding linear transformation of a given matrix.

LINEAR TRANSFORMATION OF A MATRIX


Given a matrix 𝐴 = (𝑎𝑖𝑗 )𝑛×𝑚 one can associate a linear transformation

T:U⟶V where both U and V are finite dimensional vector spaces of dimension m and n respectively.
Let 𝐵1 = {𝛼1 , 𝛼2 , … , 𝛼𝑚 } & 𝐵2 = {𝛽1 , 𝛽2 , … , 𝛽𝑛 } be the ordered basis of U & V

respectively. Define the linear transformation T:U⟶V by defining T on the vectors of B1 as 𝑇(𝛼𝑖 ) =
𝑎1𝑖 𝛽1 + 𝑎2𝑖 𝛽2 + ⋯ + 𝑎𝑛𝑖 𝛽𝑛

i.e., 𝑇(𝛼1 ) = 𝑎11 𝛽1 + 𝑎21 𝛽2 + ⋯ + 𝑎𝑛1 𝛽𝑛


𝑇(𝛼2 ) = 𝑎12 𝛽1 + 𝑎22 𝛽2 + ⋯ + 𝑎𝑛2 𝛽𝑛
………………………………………..
𝑇(𝛼𝑚 ) = 𝑎1𝑚 𝛽1 + 𝑎2𝑚 𝛽2 + ⋯ + 𝑎𝑛𝑚 𝛽𝑛
With this T can be extended to the entire space V.

Note: (1) If 𝐴 = (𝑎𝑖𝑗 ) then the linear transformation T is from m-


𝑛×𝑚
dimensional vector space to n-dimensional vector space.
(2) Linear transformation T is unique.
(3) Every matrix can be associated to a linear transformation.

Finding a linear transformation of a matrix.

−1 0
1) Find the linear transformation for the matrix [ 2 0] with respect to the bases B1 = {(1,0),
1 3
(2,-1)} and B2 = {(1,2,0), (0,-1,0),(1,-1,1)}

Program:
kill(all)$
A:matrix([-1,0],[2,0],[1,3]);
u[1]:[1,0]$
u[2]:[2,-1]$
v[1]:[1,2,0]$
v[2]:[0,-1,0]$
v[3]:[1,-1,1]$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 19


for i:1 thru 2 do(
T[i]:A[1,i]*v[1]+A[2,i]*v[2]+A[3,i]*v[3])$
for j:1 thru 2 do(
eq[j]:u[1][j]*a+u[2][j]*b)$
soln:solve([eq[1]=x,eq[2]=y],[a,b])$
p:ev(a,soln)$
q:ev(b,soln)$
T[1]*p+T[2]*q;
T:radcan(T[1]*p+T[2]*q)$
print("The linear transformation T is T(x,y)=",T)$

Output:

2 3
2)Given the matrix [ ] of linear transformation T, find T w.r.t the basis and B1 = {(1,-1), (1,1)
4 −5
}and B2 = {(1,0), (0,1)}.

3)Find the linear transformation T w.r.t the standard basis, given the matrix of

1 0 1
linear transformation A=[ 2 1 1 ].
−1 1 −2

LAB-7: Verification of rank-nullity theorem.

RANGE AND KERNEL OF LINEAR TRANSFORMATION


Definition:

Range and Rank of T: If T:U⟶V is a linear transformation then

R(T) = {T(α)/α ∈ U} is known as Range of T.

If R(T) is finite dimensional then dimension of R(T) is known as Rank of T and it is denoted by
r(T).

Note: Range space is a subspace of codomain vector space V.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 20


Kernel and Nullity of T: If T:U⟶V is a linear transformation then

N(T) = {α ∈ U/ T(α) = 0′}, where 0’ is the zero vector of V is known as Kernel of T or Null space
of T.

If N(T) is finite dimensional then dimension of N(T) is known as Nullity of T and denoted n(T)

Note: Null space is a subspace of domain vector space U.

Rank-Nullity Theorem:

If T:U⟶V is a linear transformation and U is finite dimensional vector space then dim R(T) +dim
N(T) = dim(U) i.e, r(T) + n(T) = dim(U) or

Rank + Nullity = dim(Domain)

Problems:

1) If a linear transformation T:R3⟶R3 is defined by T(e1)=(1,-1,0),

T(e2)=(2,0,1) and T(e3)=(1,1,1) then find range space, rank and nullity of T and hence verify rank-
nullity theorem.

Solution: Domain space is R3


Therefore 𝑑𝑖𝑚(𝑅 3 ) = 3.
Standard basis 𝐵 = {e1 , e2 , e3 }
We have, (𝑥, 𝑦, 𝑧) = 𝑥(e1 ) + y(e2 ) + z(e3 )
The Linear transformation is given by
𝑇(𝑥, 𝑦, 𝑧) = 𝑥T(e1 ) + yT(e2 ) + zT(e3 )
= 𝑥(1, −1,0) + 𝑦(2,0,1) + 𝑧(1,1,1)
= (𝑥 + 2𝑦 + 𝑧, −𝑥 + 𝑧, 𝑦 + 𝑧)

1 −1 0
Consider the matrix 𝐴 = [2 0 1] , 𝑅2 − 2𝑅1 , 𝑅3 − 𝑅1
1 1 1
1 −1 0
~ [0 2 1], 𝑅3 − 𝑅2 ,
0 2 1
1 −1 0
~ [0 2 1].
0 0 0
There are 2 non zero rows.
Therefore Rank(A) = 2.
Dimension of the range space = 𝑟(𝑇) = 2
Basis of 𝑅(𝑇) = {(1, −1,0), (0,2,1)}
Range space 𝑅(𝑇) = {𝑥(1, −1,0) + 𝑦(0,2,1) ⋮ 𝑥, 𝑦 ∈ 𝑅}

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 21


= {(𝑥, 2𝑦 − 𝑥, 𝑦) ⋮ 𝑥, 𝑦 ∈ 𝑅}
Let 𝑇(𝑥, 𝑦, 𝑧) = (0,0,0)
⟹ (𝑥 + 2𝑦 + 𝑧, −𝑥 + 𝑧, 𝑦 + 𝑧) = (0,0,0)
⟹ 𝑥 + 2𝑦 + 𝑧 = 0 , −𝑥 + 𝑧 = 0, 𝑦 + 𝑧 = 0.
Putting z = k, we get
⟹ 𝑥 = 𝑘, 𝑦 = −𝑘, 𝑧=𝑘
Therefore the null space is 𝑁(𝑇) = {(𝑘, −𝑘, 𝑘) ⋮ 𝑘 ∈ 𝑅}
= {𝑘(1, −1,1) ⋮ 𝑘 ∈ 𝑅}
Basis of 𝑁(𝑇) = {(1, −1,1)}
Therefore Nullity = 𝑛(𝑇) = 1,
𝑟(𝑇) + 𝑛(𝑇) = 2 + 1 = 3 = 𝑑𝑖𝑚(𝑅 3 )
Hence Rank nullity theorem is verified.
Maxima Program:
kill(all)$
d[V]:3$
print("Dimension of domain space is =",d[V])$
M:matrix([1,-1,0],[2,0,1],[1,1,1]);
r:rank(M)$
print("Dimension of the range space R(T) is =",rank(M))$
e:echelon(M)$
print("Range space R(T) is generated by ")$
for i:1 thru r do(print(e[i]))$
n:nullity(M)$
print("Dimension of null space N(T) is =", n)$
if d[V]=(r+n) then
disp("Rank-nullity theorem is verified")
else
disp("Rank-nullity theorem is not satisfied")$

Output:

2) If linear transformation T:R3⟶R3 is defined by T(e1)=(1,1,0),

T(e2)=(0,1,1) and T(e3)=(1,2,1) then find range space, rank and nullity of T and hence verify rank-
nullity theorem.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 22


Solution(2): Domain space is R3
Therefore 𝑑𝑖𝑚(𝑅 3 ) = 3.
Standard basis 𝐵 = {e1 , e2 , e3 }
We have, (𝑥, 𝑦, 𝑧) = 𝑥(e1 ) + y(e2 ) + z(e3 )
The Linear transformation is given by
𝑇(𝑥, 𝑦, 𝑧) = 𝑥T(e1 ) + yT(e2 ) + zT(e3 )
= 𝑥(1,1,0) + 𝑦(0,1,1) + 𝑧(1,2,1)
= (𝑥 + 𝑧, 𝑥 + 𝑦 + 2𝑧, 𝑦 + 𝑧)

1 1 0
Consider the matrix 𝐴 = [0 1 1] , 𝑅3 − 𝑅1
1 2 1
1 1 0
~ [0 1 1], 𝑅3 − 𝑅2 ,
0 1 1
1 1 0
~ [0 1 1].
0 0 0
There are 2 non zero rows.
Therefore Rank(A) = 2.
Dimension of the range space = 𝑟(𝑇) = 2
Basis of 𝑅(𝑇) = {(1,1,0), (0,1,1)}
Range space is given by 𝑅(𝑇) = {𝑥(1,1,0) + 𝑦(0,1,1) ⋮ 𝑥, 𝑦 ∈ 𝑅}
= {(𝑥, 𝑥 + 𝑦, 𝑦) ⋮ 𝑥, 𝑦 ∈ 𝑅}
Let 𝑇(𝑥, 𝑦, 𝑧) = (0,0,0)
⟹ (𝑥 + 𝑧, 𝑥 + 𝑦 + 2𝑧, 𝑦 + 𝑧) = (0,0,0)
⟹𝑥+𝑧 =0, 𝑥 + 𝑦 + 2𝑧 = 0, 𝑦 + 𝑧 = 0.
⟹ 𝑥 = −𝑧, 𝑦 = −𝑧, 𝑧=𝑧
Therefore the null space is 𝑁(𝑇) = {(−𝑧, −𝑧, 𝑧) ⋮ 𝑧 ∈ 𝑅}
= {𝑧(−1, −1,1) ⋮ 𝑧 ∈ 𝑅}
Basis of 𝑁(𝑇) = {(−1, −1,1)}
Therefore Nullity 𝑛(𝑇) = 1,
𝑟(𝑇) + 𝑛(𝑇) = 2 + 1 = 3 = 𝑑𝑖𝑚(𝑅 3 )
Hence Rank nullity theorem is verified.

3) If linear transformation T:R3⟶R3 is defined by T(e1)=(1,1,0),

T(e2)=(1,0,1) and T(e3)=(0,1,1) then find range space, rank and nullity of T and hence verify rank-
nullity theorem.

Solution(3): Domain space is R3


Therefore 𝑑𝑖𝑚(𝑅 3 ) = 3.
Standard basis 𝐵 = {e1 , e2 , e3 }
We have, (𝑥, 𝑦, 𝑧) = 𝑥(e1 ) + y(e2 ) + z(e3 )
The Linear transformation is given by

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 23


𝑇(𝑥, 𝑦, 𝑧) = 𝑥T(e1 ) + yT(e2 ) + zT(e3 )
= 𝑥(1,1,0) + 𝑦(1,0,1) + 𝑧(0,1,1)
= (𝑥 + 𝑦, 𝑥 + 𝑧, 𝑦 + 𝑧)
1 1 0
Consider the matrix 𝐴 = [1 0 1] , 𝑅2 − 𝑅1
0 1 1
1 1 0
~ [0 −1 1], 𝑅3 + 𝑅2 ,
0 1 1
1 1 0
~ [0 −1 1].
0 0 2
There are 3 non zero rows.
Therefore Rank(A) = 3.
Dimension of the range space is 𝑟(𝑇) = 3,
Basis of 𝑅(𝑇) = {(1,1,0), (0, −1,1), (0,0,2)}
Range space 𝑅(𝑇) = {𝑥(1,1,0) + 𝑦(0, −1,1) + 𝑧(0,0,2) ⋮ 𝑥, 𝑦, 𝑧 ∈ 𝑅}
= {(𝑥, 𝑥 − 𝑦, 𝑦 + 2𝑧) ⋮ 𝑥, 𝑦, 𝑧 ∈ 𝑅}
Let 𝑇(𝑥, 𝑦, 𝑧) = (0,0,0)
⟹ (𝑥 + 𝑦, 𝑥 + 𝑧, 𝑦 + 𝑧) = (0,0,0)
⟹𝑥+𝑦 =0, 𝑥 + 𝑧 = 0, 𝑦 + 𝑧 = 0.
⟹ 𝑥 = 0, 𝑦 = 0, 𝑧=0
Therefore the null space is 𝑁(𝑇) = {(0,0,0) ⋮ 𝑧 ∈ 𝑅}
Therefore Nullity 𝑛(𝑇) = 0,
𝑟(𝑇) + 𝑛(𝑇) = 3 + 0 = 3 = 𝑑𝑖𝑚(𝑅 3 )
Hence Rank nullity theorem is verified.

4) If linear transformation T:R3⟶R3 is defined by T(e1)=(1,1,2),

T(e2)=(1,-1,0) and T(e3)=(0,0,1) then find range space, rank and nullity of T and hence verify rank-
nullity theorem.

Solution(4): Domain space is R3


Therefore 𝑑𝑖𝑚(𝑅 3 ) = 3.
Standard basis 𝐵 = {e1 , e2 , e3 }
We have, (𝑥, 𝑦, 𝑧) = 𝑥(e1 ) + y(e2 ) + z(e3 )
The Linear transformation is given by
𝑇(𝑥, 𝑦, 𝑧) = 𝑥T(e1 ) + yT(e2 ) + zT(e3 )
= 𝑥(1,1,2) + 𝑦(1, −1,0) + 𝑧(0,0,1)
= (𝑥 + 𝑦, 𝑥 − 𝑦, 2𝑥 + 𝑧)

1 1 2
Consider the matrix 𝐴 = [1 −1 0] , 𝑅2 − 𝑅1
0 0 1

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 24


1 1 2
1
~ [0 −2 −2], 𝑅2 → − 2 𝑅2 ,
0 0 1
1 1 2
~ [0 1 1].
0 0 1
Rank(A) = 3.
Dimension of the range space is 𝑟(𝑇) = 3,
Basis of 𝑅(𝑇) = {(1,1,2), (0,1,1), (0,0,1)}
Range space 𝑅(𝑇) = {𝑥(1,1,2) + 𝑦(0,1,1) + 𝑧(0,0,1) ⋮ 𝑥, 𝑦, 𝑧 ∈ 𝑅}
= {(𝑥, 𝑥 + 𝑦, 2𝑥 + 𝑦 + 𝑧) ⋮ 𝑥, 𝑦 ∈ 𝑅}
Let 𝑇(𝑥, 𝑦, 𝑧) = (0,0,0)
⟹ (𝑥 + 𝑦, 𝑥 − 𝑦, 2𝑥 + 𝑧) = (0,0,0)
⟹𝑥+𝑦 =0, 𝑥 − 𝑦 = 0, 2𝑥 + 𝑧 = 0.
⟹ 𝑥 = 0, 𝑦 = 0, 𝑧=0
Therefore the null space is 𝑁(𝑇) = {(0,0,0) ⋮ 𝑧 ∈ 𝑅}
Therefore Nullity 𝑛(𝑇) = 0,
𝑟(𝑇) + 𝑛(𝑇) = 3 + 0 = 3 = 𝑑𝑖𝑚(𝑅 3 )
Hence Rank nullity theorem is verified.

LAB-8: Evaluation of the integrals using gamma function and Beta


function.
Evaluation of the integrals using gamma function
1. E v a l u a t e 𝜸(7)
Program:
kill(all)$
n:7;
gamma(n);

2. E v a l u a t e 𝛾(9⁄ )
2
kill(all)$
n:9/2;
gamma(n);

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 25


3. E v a l u a t e 𝛾(−3⁄ ).
2
kill(all)$
n:-3/2;
gamma(n);

𝜸(𝟓⁄𝟐)
4. E v a l u a t e
𝜸(𝟏⁄𝟐)

kill(all)$
n:5/2;
m:1/2;
gamma(n)/gamma(m);

5. E v a l u a t e 𝛾(1⁄ )𝛾(5⁄ )𝛾(3⁄ )


2 2 2

kill(all)$
n:1/2;
m:5/2;
k:3/2;
gamma(n)*gamma(m)*gamma(k);

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 26


𝜸(𝟕⁄𝟑)
6. Evaluate
𝜸(𝟒⁄𝟑)

Program:
kill(all)$
n:7/3;
m:4/3
gamma(n)/gamma(m);

𝜸(𝟑)𝜸(𝟓⁄𝟐)
7. Evaluate
𝜸(𝟏𝟏⁄𝟐)
Program:
kill(all)$
k:3;
n:5/2;
m:11/2
(gamma(3)*gamma(n))/gamma(m);

∞ −𝒙 𝟒
8. E v a l u a t e ∫𝟎 𝒆 𝒙 𝒅𝒙

∞ −𝒙 𝟕
9. E v a l u a t e ∫𝟎 𝒆 𝒙 𝒅𝒙

Evaluation of the integrals using Beta function.


Evaluate the following.
1. 𝛽(3,5)

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 27


Program:
kill(all)$
beta(3,5);
Output:

5
2. 𝛽(7⁄ , ⁄ )
2 2
Program:
kill(all)$
beta(7/2,5/2);

3 . 𝑆how that 𝛽(8,2) = 𝛽(2,8)


Program:
kill(all)$
a:beta(8,2);
b:beta(2,8);
if (a=b) then
disp(“beta(m,n)=beta(n,m)”)
else
disp(“beta(m,n)#beta(n,m)”)$
Output:

𝟏𝟐
4. Evaluate∫𝟎 𝒙 (𝟏 − 𝒙) 𝒅𝒙
𝟑

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 28


Program:
kill(all)$
f:x^2*(1-x)^3;
m:2;
n:3;
beta(m+1,n+1);
Output:

𝟏 𝟑⁄
5. Evaluate ∫𝟎 𝒙 𝟐
√𝟏 − 𝒙 𝒅𝒙

LAB-9: Verification of Green’s theorem.


Green’s theorem in a plane:
Statement: Let P(x,y) and Q(x,y) be two continuous functions having continuous
partial derivatives in a region R of the xy-plane bounded by a simple curve C, then
𝝏𝑸 𝝏𝑷
∮𝑷𝒅𝒙 + 𝑸𝒅𝒚 = ∬ ( − ) 𝒅𝒙𝒅𝒚
𝑪 𝑹 𝝏𝒙 𝝏𝒚

1. Verify Green’s theorem for ∫𝑐(𝑥𝑦 + 𝑦 2 )𝑑𝑥 + 𝑥 2 𝑑𝑦 where c is the curve


bounded by 𝑦 = 𝑥 2 𝑎𝑛𝑑 𝑦 = 𝑥.
Program:

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 29


kill(all)$
P(x,y):=x*y+y^2$
Q(x,y):=x^2$
s:diff(Q(x,y),x)-diff(P(x,y),y)$
Z:integrate(integrate(s,y,x^2,x),x,0,1);
F1:[P(x,x^2),Q(x,x^2)].[diff(x,x),diff(x^2,x)]$
I1:integrate(F1,x,0,1);
F2:[P(x,x),Q(x,x)].[diff(x,x),diff(x,x)]$
I2:integrate(F2,x,1,0);
if (Z=I1+I2) then
disp("Green's theorem is verified for the given problem")
else
disp("Green's theorem is not verified for the given problem")$

2. Verify Green’s theorem for ∫𝑐(𝑥 + 2𝑦)𝑑𝑥 + (𝑥 − 2𝑦) 𝑑𝑦 where c is the


curve bounded by the point (0,0), (1,0), (0,1) and (1,1).

Program:
kill(all)$
P(x,y):=x+2*y$
Q(x,y):=x-2*y$
s:diff(Q(x,y),x)-diff(P(x,y),y)$
Z:integrate(integrate(s,x,0,1),y,0,1);
F1:[P(1,y),Q(1,y)].[diff(1,x),diff(y,y)]$
I1:integrate(F1,y,0,1);
F2:[P(0,y),Q(0,y)].[diff(1,x),diff(y,y)]$
I2:integrate(F2,y,1,0);
F3:[P(x,1),Q(x,1)].[diff(x,x),diff(1,y)]$
I3:integrate(F3,x,1,0);
F4:[P(x,0),Q(x,0)].[diff(x,x),diff(1,y)]$
I4:integrate(F4,x,0,1);
if Z=I1+I2+I3+I4 then
disp("Green's theorem is verified for the given problem")
else
disp("Green's theorem is not verified for the given problem")$

3. Verify Green’s theorem for ∫𝑐(3𝑥 2 − 8𝑦 2 )𝑑𝑥 + (4𝑦 − 6𝑥𝑦 )𝑑𝑦 where
c is the curve bounded by 𝑦 = 𝑥 2 𝑎𝑛𝑑 𝑥 = 𝑦 2 .

Program:

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 30


kill(all)$
assume(x>0)$
P(x,y):=3*x^2-8*y^2$
Q(x,y):=4*y-6*x*y$
s:diff(Q(x,y),x)-diff(P(x,y),y)$
Z:integrate(integrate(s,y,x^2,sqrt(x)),x,0,1);
F1:[P(x,x^2),Q(x,x^2)].[diff(x,x),diff(x^2,x)]$
I1:integrate(F1,x,0,1);
F2:[P(y^2,y),Q(y^2,y)].[diff(y^2,y),diff(y,y)]$
I2:integrate(F2,y,1,0);
if Z=I1+I2 then
disp("Green's theorem is verified for the given problem")
else
disp("Green's theorem is not verified for the given problem")$

LAB-10: Verification of Gauss divergence theorem.


Gauss Divergence theorem
Statement: Let S be the closed boundary surface of a region of volume V. Then for a
continuously differentiable vector field ⃗𝑭 defined on V and on S
⃗ .𝒏
∬𝑭 ̂ 𝒅𝒔 = ∭𝒅𝒊𝒗 ⃗𝑭 𝒅𝒗
𝑺 𝑽
̂ is the outward drawn unit normal vector at any point of S.
where 𝒏

1. Verify Gauss Divergence theorem for ∬𝑠𝐹 . 𝑛̂𝑑𝑠 where


𝐹 = 2𝑥𝑦𝑖̂ + 𝑦𝑧 2 𝑗̂ + 𝑥𝑧𝑘̂ and S is the surface bounded by the planes
𝑥 = 0, 𝑥 = 1, 𝑦 = 0, 𝑦 = 2, 𝑧 = 0 𝑎𝑛𝑑 𝑧 = 3.
Program:
kill(all)$
load("vect")$
F:[2*x*y,y*z^2,x*z];
div(F)$
express(%)$
I:ev(%,diff)$
V:integrate(integrate(integrate(I,x,0,1),y,0,2),z,0,3);
i:[1,0,0]$
j:[0,1,0]$
k:[0,0,1]$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 31


F1:subst(z=0,F.-k)$
S1:integrate(integrate(F1,x,0,1),y,0,2);
F2:subst(y=0,F.-j)$
S2:integrate(integrate(F2,x,0,1),z,0,3);
F3:subst(x=0,F.-i)$
S3:integrate(integrate(F3,y,0,2),z,0,3);
F4:subst(z=3,F.k)$
S4:integrate(integrate(F4,x,0,1),y,0,2);
F5:subst(y=2,F.j)$
S5:integrate(integrate(F5,x,0,1),z,0,3);
F6:subst(x=1,F.i)$
S6:integrate(integrate(F6,y,0,2),z,0,3);
S:S1+S2+S3+S4+S5+S6;
if(S=V) then
disp("Gauss divergence theorem is satisfied")
else
disp("Gauss divergence theorem is not satisfied")$

2. Verify Gauss Divergence theorem for ∬𝑠𝐹 . 𝑛̂𝑑𝑠 where


𝐹 = (𝑥 + 𝑦 2 )𝑖̂ − 2𝑥𝑗̂ + 2𝑦𝑧𝑘̂ and S is the surface bounded by the
planes 𝑥 = 0, 𝑦 = 0, 𝑧 = 0 and 2𝑥 + 𝑦 + 2𝑧 = 6.
Program:
kill(all)$
load("vect")$
load(eigen)$
F:[y^2+x,-2*x,2*y*z];
div(F)$
express(%)$
I:ev(%,diff)$
V:integrate(integrate(integrate(I,z,0,(6-y-2*x)/2),y,0,6-2*x),x,0,3);
i:[1,0,0]$
j:[0,1,0]$
k:[0,0,1]$
g:2*x+y+2*z-6$
grad(g)$
express(%)$
h:ev(%,diff)$
n:factor(uvect(h))$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 32


F1:ratsimp(F.n)/(n.k)$
F2:ratsimp(subst(z=(6-2*x-y)/2,F1))$
S1:integrate(integrate(F2,y,0,6-2*x),x,0,3);
F3:subst(z=0,F.-k)$
S2:integrate(integrate(F3,y,0,6-2*x),x,0,3);
F4:subst(y=0,F.-j)$
S3:integrate(integrate(F4,z,0,3-x),x,0,3);
F5:subst(x=0,F.-i)$
S4:integrate(integrate(F5,z,0,(6-y)/2),y,0,6);
if(V=S1+S2+S3+S4) then
disp("Gauss divergence theorem is satisfied")
else
disp("Gauss divergence theorem is not satisfied")$

LAB-11: Verification of Stokes’ theorem.


Stoke’s theorem:
Statement: The line integral of the tangential component of a vector 𝐹 taken around a
simple closed curve C is equal to the surface integral of the normal component of the
curl ⃗𝑭 taken over any surface S having C as its boundary
i.e., ∮𝑪 ⃗𝑭 . 𝒅𝒓
⃗ = ∬𝑺(𝛁 × ⃗𝑭). 𝒏
̂ 𝒅𝑺
1. Verify Stoke’s theorem for∫𝑐𝐹 . 𝑑𝑟 where 𝐹 = (2𝑥 − 𝑦)𝑖̂ − 𝑦𝑧 2 𝑗̂ − 𝑦 2 𝑧𝑘̂
and S is the surface bounded 𝑥 2 + 𝑦 2 + 𝑧 2 = 1 and C is its boundary.
Program:
kill(all)$
load("vect")$
F:[2*x-y,-y*z^2,-y^2*z];
curl(F)$
express(%)$
E:ev(%,diff)$
k:[0,0,1]$
E1:E.k$
assume(x^2<1)$
I:4*integrate(integrate(E1,y,0,sqrt(1-x^2)),x,0,1);
x:cos(t)$
y:sin(t)$
z:0$
F:[2*x-y,-y*z^2,-y^2*z]$

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 33


dx:diff(x,t)$
dy:diff(y,t)$
dz:diff(z,t)$
dr:[dx,dy,dz]$
F1:F.dr$
I1:integrate(F1,t,0,2*%pi);
if(I=I1) then
disp("Stokes theorem is verified")
else
disp("Stokes theorem is not verified")$

2. Verify Stoke’s theorem for∫𝑐𝐹 . 𝑑𝑟 where 𝐹 = (𝑥 2 − 𝑦 2 )𝑖̂ + 2𝑥𝑦𝑗̂ and S


is the surface bounded by the planes 𝑥 = 0, 𝑥 = 𝑎, 𝑦 = 0, 𝑦 = 𝑏,
𝑧 = 0, 𝑧 = 𝑐 with the face 𝑧 = 0 removed.
Program:
kill(all)$
load("vect")$
assume(a,b>0)$
P(x,y):=x^2-y^2;
Q(x,y):=2*x*y;
R(x,y):=0;
F:[P(x,y),Q(x,y),R(x,y)];
curl(F)$
express(%)$
E:ev(%,diff)$
k:[0,0,1]$
E1:E.k$
S:integrate(integrate(E1,y,0,b),x,0,a);
F1:[P(x,0),Q(x,0)].[diff(x,x),diff(0,x)]$
C1:integrate(F1,x,0,a);
F2:[P(a,y),Q(a,y)].[diff(a,y),diff(y,y)]$
C2:integrate(F2,y,0,b);
F3:[P(x,b),Q(x,b)].[diff(x,x),diff(b,x)]$
C3:integrate(F3,x,a,0);
F4:[P(0,y),Q(0,y)].[diff(0,y),diff(y,y)]$
C4:integrate(F4,y,b,0);
if (S=ratsimp(C1+C2+C3+C4)) then
disp("Stoke's theorem is verified for the given problem")

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 34


else
disp("Stoke's theorem is not verified for the given problem")$

Note: Write the manual part on the ruled side and Maxima program &
Output on the unruled side of the record.

Dr.T.G.Sudha, Associate Professor, NU,Bengaluru-560001. 35

You might also like