39
Solution File Assignment #1 of Linear Algebra (Fall 2006) Total marks: 30 Question # 1 Let 1 2 3 1 0 5 2 2, 1 , 6, 1 0 2 8 6 b a a a Determine whether b can be written as a linear combination of 1 2 3 , , aaa ? Solution: If b can be written as linear combination of 1 2 3 , , aaa Then 1 1 2 2 3 3 xa xa xa b 1 2 3 1 0 5 2 2 1 6 1 0 2 8 6 x x x Here we have to find the value of 1 2 3 , , x x x 1 3 1 2 3 2 3 5 2 2 6 1 2 8 6 x x x x x x x The argument matrix of this system is as follow 1 0 5 2 2 1 6 1 0 2 8 6 Now doing row operation on this matrix 1 2 1 0 5 2 0 1 4 32 0 2 8 6 R R And on the last row we perform the operation 2 3 2R R we get the final matrix as

Linear Algebra - Solved Assignments - Fall 2006 Semester

Embed Size (px)

DESCRIPTION

Linear Algebra - Solved Assignments - Fall 2006 Semester

Citation preview

Page 1: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File Assignment #1 of Linear Algebra

(Fall 2006)

Total marks: 30

Question # 1

Let 1 2 3

1 0 5 2

2 , 1 , 6 , 1

0 2 8 6

ba a a

Determine whether b can be written as a linear combination of1 2 3, ,a a a ?

Solution:

If b can be written as linear combination of 1 2 3, ,a a a

Then

1 1 2 2 3 3x a x a x a b

1 2 3

1 0 5 2

2 1 6 1

0 2 8 6

x x x

Here we have to find the value of 1 2 3, ,x x x

1 3

1 2 3

2 3

5 2

2 6 1

2 8 6

x x

x x x

x x

The argument matrix of this system is as follow

1 0 5 2

2 1 6 1

0 2 8 6

Now doing row operation on this matrix

1 2

1 0 5 2

0 1 4 3 2

0 2 8 6

R R

And on the last row we perform the operation 2 32R R

we get the final matrix as

Page 2: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 0 5 2

0 1 4 3

0 0 0 0

Now we have solution from this matrix

1 3

1 3

5 2

.

2 5

x x

i e

x x

2 3

2 3

4 3

.

3 4

x x

i e

x x

3x Is free (we can take any value)

There exist a solution of these equation therefore we can write b as linear combination

for example if we take 3 2x then it will give 1 8x and 2 5x . So we can write b as

linear combination as follow

1 2 3

1 0 5 2

2 1 6 1

0 2 8 6

x x x

Putting the values of 1 8x , 2 5x and 3 2x we have

1 0 5 2

8 2 5 1 2 6 1

0 2 8 6

Thus b can be written as a linear combination of 1 2 3,a a a

Question # 2

Describe all the solutions of the following system in parametric vector form

1 2 3

3 5 4x x x

1 2 3

4 8 7x x x

1 2 3

3 7 9 6x x x

Solution: The argument matrix of this system is

1 3 5 4

1 4 8 7

3 7 9 6

After doing row operation 1 21R R and 1 33R R on row 2 and row 3. We get

Page 3: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 3 5 4

0 1 3 3

0 2 6 6

After doing row operation 2 32R R on row 3 we get

1 3 5 4

0 1 3 3

0 0 0 0

After doing row operation 2 13R R on row 1 we get the final matrix

1 0 4 5

0 1 3 3

0 0 0 0

From matrix we have

1 3

1 3

4 5

.

5 4

x x

i e

x x

2 3

2 3

3 3

.

3 3

x x

i e

x x

3x is free

1 3

2 3 3

3 3

5 4 5 4

3 3 3 3

0 1

x x

x x x

x x

3

5

3

0

4

3

1

here

v

p

so

x v x p

Which is the required parametric vector form.

Page 4: Linear Algebra - Solved Assignments - Fall 2006 Semester

Question # 3

Let 1 2 3

0 0 4

0 , 3 , 1

2 8 5

v v v

Does { 1 2 3, ,v v v } span

3

R ?

Why or why not?

Solution

1 2 3

3

1 2 3

1 1 2 2 3 3

1 2 3

0 0 4

0 , 3 , 1

2 8 5

have to determine whether arbitrary vector b=(b ,b ,b ) in R can

be expressed as a linear combination

b=k v +k v +k v

of a vectors v , v , v Ex

We

v v v

1 2 3 1 2 3

31 2

1 2 3

1 2 3

1 1 2 3

2 1 2

pressing this terms of components gives

0 0 4

(b ,b ,b )=K 0 3 1

2 8 5

40K 0

(b1,b2,b3)= 0K 3 1

2K 8 5

0 0 4

0 3

K K

KK

K K

K K

b K K K

b K K

3

3 1 2 3

3

1 2 3

2 8 5

0 0 4

0 3 1

2 8 5

It has non zero determinant

So we have det 24 0, tan

{ , , }

K

b K K K

A its maens that system is consis t

Therefore v v v span R

Page 5: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File Of Assignment #2 of Linear Algebra

(Fall 2006)

Question # 1

Determine whether the columns of the following matrix are linear Independent or not.

0 8 5

3 7 4

1 5 4

1 3 2

Solution: We have to see that the equation Ax=0 has trival solution or non trival

solution. Take the matrix

0 8 5 0

3 7 4 0

1 5 4 0

1 3 2 0

Interchange row 4 and row 1. We have

1 3 2 0

3 7 4 0

1 5 4 0

0 8 5 0

After doing row operation 1 23R R on row 2 we get

1 3 2 0

0 2 2 0

1 5 4 0

0 8 5 0

After doing row operation 1 3R R on row 3 we get

1 3 2 0

0 2 2 0

0 2 2 0

0 8 5 0

After doing row operation 2 31R R on row 3 we get

Page 6: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 3 2 0

0 2 2 0

0 0 0 0

0 8 5 0

Interchange row 3 ad row 4

1 3 2 0

0 2 2 0

0 8 5 0

0 0 0 0

After doing row operation 2

1

2R and 2 38R R respectively we get following matrix

1 3 2 0 1 3 2 0

0 1 1 0 0 1 1 0

0 8 5 0 0 0 3 0

0 0 0 0 0 0 0 0

As we can see from last matrix that there is no free variable and there are three basic

variables 1 2 3, ,x x x . So the equation Ax = 0 has only the trivial solution and column are

linearly independent.

Question # 2

A linear transformation T is defined as T(x)=Ax. Find a vector x whose Image under T is ‘b’ and determine whether x is unique. Where

A =

1 0 2

2 1 6

3 2 5

, b =

1

7

3

Solution: For this we have to solve Ax = b or

1

2

3

1 0 2 1

2 1 6 7

3 2 5 3

x

x

x

The augmented matrix is

1 0 2 1

2 1 6 7

3 2 5 3

We have to do row operations. First 1 22R R on row2 and then 1 33R R on row 3 we

get following matrix respectively.

Page 7: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 0 2 1 1 0 2 1

0 1 2 5 0 1 2 5

3 2 5 3 0 2 1 0

After doing row operations 2 32R R and

3

1

5R respectively on row3 we get following two

matrixes respectively

1 0 2 1 1 0 2 1

0 1 2 5 0 1 2 5

0 0 5 10 0 0 1 2

At last we do the row operation 3 12R R on row 1 and 3 22R R on row2 we get the

following matrix

1 0 0 3

0 1 0 1

0 0 1 2

Here we have

1

2

3

3

1

2

x

x

x

Vector x is

3

1

2

whose Image under T is ‘b’

Yes x is unique because there exist a unique solution.

Question # 3

Let T : 2 2

R R be a linear transformation such that

T( 1 2,x x ) = (

1 2 1 2,4 5x x x x ) .Find x such that T(x)=(3,8)

Solution:

1 2

1 2

( )4 5

x xT x

x x

Here 3

( )8

T x

after putting we get

1 2

1 2

3

8 4 5

x x

x x

After equating both sides we get

1 2

1 2

3

4 5 8

x x

x x

The augmented matrix of this system is

Page 8: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 1 3

4 5 8

First applying 1 24R R on row 2 and then

2 11R R on row 1 we get the following two

matrixes respectively.

1 1 3 1 0 7

0 1 4 0 1 4

From last matrix we have

1

2

7

4

x

x

So x is

1

2

7

4

xx

x

Page 9: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File Of Assignment # 3 of Linear Algebra (Fall 2006)

Total marks: 25

Question # 1

Solve the equation Ax=b by using LU-Decomposition for the given matrix

A =

2 3 4

4 5 10

4 8 2

, b =

6

16

2

Solution:

Marks 10

Page 10: Linear Algebra - Solved Assignments - Fall 2006 Semester

1

1 2 1 3

2

2 3 4 1 0 0

4 5 10 , * 1 0

4 8 2 * * 1

1 3/ 2 2 2 0 01

4 5 10 , * 1 02

4 8 2 * * 1

1 3/ 2 2 2 0 0

0 1 2 4 4 , 4 1 0

0 2 6 4 * 1

1 3/ 2 2 2 0 0

0 1 2 1 , 4 1 0

0 2 6 4 * 1

U L

U R L

U R R and R R L

U R L

2 3

3

1

2

3

1

2

1 3/ 2 2 2 0 0

0 1 2 2 , 4 1 0

0 0 2 4 2 1

1 3/ 2 2 2 0 01

0 1 2 , 4 1 02

0 0 1 4 2 2

,

:

2 0 0 6

4 1 0 16

4 2 2 2

3

U R R L

U

R L

we see that A LU let

Ly b

y

y

y

y

y

3

1

2

3

1

2

3

4

1

1 3/ 2 2 3

0 1 2 4

0 0 1 1

4

2

1

y

and Ux y

x

x

x

x

x

x

Page 11: Linear Algebra - Solved Assignments - Fall 2006 Semester

Question # 2

Solve the equation Ax=b by taking inverse of the matrix of the following

system of equations.

1 3

1 2 3

1 2 3

2 5

3 4 2

2 3 4 1

x x

x x x

x x x

Marks 10

Solution:

Page 12: Linear Algebra - Solved Assignments - Fall 2006 Semester

1

2

3

-1

3

1 2

1 3

1 0 2 5

A= 3 1 4 , , 2

2 3 4 1

by [A I ] finding A :

1 0 2 1 0 0

3 1 4 0 1 0

2 3 4 0 0 1

1 0 2 1 0 0

0 1 2 3 1 0 3

2 3 4 0 0 1

1 0 2 1 0 0

0 1 2 3 1 0 2

0 3 8 2 0 1

1 0

x

x x b

x

R R

R R

2 3

3 2 3 1

3

1 1

1

1

2 1 0 0

0 1 2 3 1 0 3

0 0 2 7 3 1

1 0 0 8 3 1

0 1 0 10 4 1

0 0 2 7 3 1

1 0 0 8 3 1

0 1 0 10 4 1 / 2

0 0 1 7 / 2 3/ 2 1/ 2

8 3 1

10 4 1

7 / 2 3/ 2 1/ 2

8 3 1

10 4 1

7 / 2 3

R R

R R and R R

R

Henc

we can easily check that A A I

A

x A b

A A

1

2

3

5

2

/ 2 1/ 2 1

35

43

15

x

x

x

Page 13: Linear Algebra - Solved Assignments - Fall 2006 Semester

Question # 3

Let A =

1 1 1

0 2 3

5 5 1

.Find the third column of 1

A

without computing

the other columns. Marks 5

Solution

3 1

3

2 3

After performing hte row operations we get,

1 1 1 * * 0

0 2 3 * * 0 R 5R

5 5 1 * * 1

1 1 1 * * 01

0 2 3 * * 0 R4

0 0 4 * * 1

1 1 1 * * 0

0 2 3 * * 0 R 3R

0 0 1 * * 1/ 4

1 1 1 * * 01

0 2 0 * * 3/ 42

0 0 1 * * 1/ 4

2

1 3

1 2

1

R

1 1 1 * * 0

0 1 0 * * 3/ 8 R R

0 0 1 * * 1/ 4

1 1 0 * * 1/ 4

0 1 0 * * 3/ 8 R R

0 0 1 * * 1/ 4

1 0 0 * * 1/ 8

0 1 0 * * 3/ 8

0 0 1 * * 1/ 4

Third column of without computing the other columns is given by,

* * 1/ 8

A * * 3/ 8

*

* 1/ 4

Page 14: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File OF Assignment no.4 Fall 2006 (Linear Algebra)

Question # 1

Let A=

0 1 4

2 3 2

5 8 7

and b=

8

1

1

.Determine whether b is in the column

space of A. Marks 10

Solution: To determine the b is in the column space of A, we see that the aug. matrix is

consist ant or not. Now

Row reducing the augmented matrix [A b]

0 1 4 8

~ 2 3 2 1

5 8 7 1

2 3 2 1

~ 0 1 4 8

5 8 7 1

2 3 2 1

~ 0 1 4 8

0 1/ 2 2 3/ 2

2 3 2 1

~ 0 1 4 8

0 0 0 5 / 2

We conclude that Ax = b is inconsistent and So b is not in the Col of A.

Question # 2

Find the rank of the following matrix,

Page 15: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2 4 3 3

5 10 9 7 8

4 8 9 2 7

2 4 5 0 6

Marks 10

Solution:

1 2 4 3 3

5 10 9 7 8A=

4 8 9 2 7

2 4 5 0 6

We have to find the reduced row echelon form

1 2 1 3 1 4Applying -5R +R ,-4R +R ,2R +R

1 2 4 3 3

0 0 11 22 7

0 0 7 14 5

0 0 3 6 0

3 4 42Applying 3R +7R ,3 +11R

1 2 4 3 3

0 0 11 22 7

0 0 0 0 15

0 0 0 0 21

R

3 4Applying -21R +15R

1 2 4 3 3

0 0 11 22 7

0 0 0 0 15

0 0 0 0 0

Since The Matrix has 3 pivot columns ,so the rank A = 3

Rank(A) = 3

Question # 3

Page 16: Linear Algebra - Solved Assignments - Fall 2006 Semester

By using Cramer’s Rule, solve the following system of equations,

1 2 3

1 3

1 2 3

2 4

2 2

3 3 2

x x x

x x

x x x

Marks 10

Solution:

1 2 3

1 3

1 2 3

2 4

2 2

3 3 2

x x x

x x

x x x

Take determinant,

2 1 10 2 1 2 1 0

1 0 2 2 1 11 3 3 3 3 1

3 1 3

D

= 2(-2) - 1(-3-6) + 1(-1 )

= 2(-2) - 1(-9) - 1

= -4 +9 - 1 = 4

D = 4

Page 17: Linear Algebra - Solved Assignments - Fall 2006 Semester

1

11

2

22

3

3

4 1 1

2 0 2 16

2 1 3

164

4

2 52

5213

4

4

D

Dx

D

D

Dx

D

D

Dx

3 41

4D

So x1 = -4

x2 = 13

x3 = -1

Page 18: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File of Assignment No. 5

LINEAR ALGEBRA (Fall 2006)

Question # 1 Find the dimension of Null Space and Column Space for the matrix

A=

4 1 2 2

3 2 0 1

1 1 2 1

SOLUTION: In order to find the dimension of the column Space we have to Row

Reduced the given matrix

A=

4 1 2 2

3 2 0 1

1 1 2 1

To Echelon Form:

4 1 2 2

3 2 0 1

1 1 2 1

1 1 2 1

~ 3 2 0 11 3

4 1 2 2

1 1 2 1

~ 0 5 6 2 3 , 41 2 1 3

0 5 6 2

1 1 2 1

~ 0 5 6 22 3

0 0 0 0

A

change R with R

R R R R

R R

Page 19: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 1 2 1

1~ 0 1 6/5 2/5

250 0 0 0

R

Thus A has two pivot column so the dimension of ColA=2.

For Null space, we need the reduced echelon form.

Further row operations on A yields

1 0 4/5 3/5

0 1 6/5 2/5

0 0 0 0

~

A has two free variables x3 and x4.

Dimensions of Null Space of A, NullA=2

So dim of ColA + dim of NullA=n(the no. of Columns of A)

Which is true. Hence Dimension Theorem is true.

Question # 2

Let A=

4 2 3

1 1 3

2 4 9

. An Eigenvalue of A is 3.Find a basis for

the corresponding eigenspace.

Solution:

The scalar 3 is an Eigenvalue of A if and only if the equation

3AX X

Has the nontrivial solution.

3

3 0

AX X

A I X

Now we solve A-3I

Page 20: Linear Algebra - Solved Assignments - Fall 2006 Semester

4 2 3 3 0 0

3 1 1 3 0 3 0

2 4 9 0 0 3

1 2 3

1 2 3

2 4 6

A I

Row reduced the augmented matrix for 3 0A I X :

1 2 1 3

1 2 3 0

1 2 3 0

2 4 6 0

1 2 3 0

0 0 0 0

0 0 0 0

~ , 2R R R R

A has the free variables 2 3andx x so 3 in Eigenvalue of A.

The general solution is:

1

2 2 3

3

2 3

1 0

0 1

x

x x x

x

The basis is for the eigenspace is

2 3

1 . 0

0 1

.

Page 21: Linear Algebra - Solved Assignments - Fall 2006 Semester

Question # 3

Is =4 an Eigenvalue of

3 0 1

2 3 1

3 4 5

? If so find the

corresponding eigenvector.

Solution:

Suppose A=

3 0 1

2 3 1

3 4 5

The scalar 4 is an Eigenvalue of A if and only if the equation

4AX X Has the nontrivial solution.

4

4 0

AX X

A I X

Solve the 4A I .

3 0 1 4 0 0

4 2 3 1 0 4 0

3 4 5 0 0 4

1 0 1

2 1 1

3 4 1

A I

Row reduced the augmented matrix for 4A I :

1 2 1 3

1 0 1 0

2 1 1 0

3 4 1 0

1 0 1 0

~ 0 1 1 0 2 , 3

0 4 4 0

R R R R

2 3

1 2

1 0 1 0

~ 0 1 1 0 4

0 0 0 0

1 0 1 0

~ 0 1 1 0 ,

0 0 0 0

R R

R R

A has free variable 3x so 4 is Eigenvalue of the matrix A.

Page 22: Linear Algebra - Solved Assignments - Fall 2006 Semester

Let 3x =1

1 3 1

2 3 2

1 2

0 1 0

0 1 0

1 1So and

x x x

x x x

x x

Hence the correspondence eigenvector is

1 1

1 1

1 1

or

Page 23: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File Assignment # 6 ( Linear Algebra)

(Fall 2006)

Total marks: 20

Question # 1

Diagonal the following matrix, if possible

A = 1 4

1 2

Solution:

Step 1: Find the Eigen values of A. The characteristic equation is as follow:

Det |A- I |=0

2

2

2

1 40

1 2

(1 )( 2 ) 4(1) 0

2 2 4 0

6 0

3 2 6 0

( 3) 2( 3) 0

( 3)( 2) 0

3,2

Step 2: Find two linearly independent vectors of A.

Solve the characteristic equation

Page 24: Linear Algebra - Solved Assignments - Fall 2006 Semester

1

2

1 2 1

1 2

2 2

1 2

1

1

1

2

1

( ) 0

=-3

1-(-3) 4 0

1 -2-(-3) 0

4 4 0 1 1 0 1 1 0~ 1/ 4 ~

1 1 0 1 1 0 0 0 0

0

x as x is a free variable.

0

0

1

1

A I x

For

x

x

R R R

x x

Take t

x x

x t

x t

x tt

x t

V

1

2

1 2 1

1 2

2 2

1 2

1

1

1

2

2

1

1

=2

1-2 4 0

1 -2-2 0

1 4 0 1 4 0 1 4 0~ ~

1 4 0 1 4 0 0 0 0

4 0

x as x is a free variable.

4 0

4 0

4

4 4

1

4

1

For

x

x

R R R

x x

Take s

x x

x s

x s

x ss

x s

V

1 2 and V are linearly independent.V

Step 3: Construct p from the vectors V1 and V2.

Page 25: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2

1 4

1 1

4:

Construct D from the corresponding eigen values according to the

arrangement in the above step.

-3 0D=

0 2

will varify AP=PD which is the condition for a diagonalizable m

p V V

p

Step

We

atrix.

1 4 1 4 3 8AP=

1 -2 1 1 3 2

1 4 -3 0 3 8

1 1 0 2 3 2

A is diagonaslizable.

PD

Hence

Question # 2

(a) Classify the following matrices as an attractor,repellor or a saddle

Point of the Dynamical System 1K K

Ax x

A = 1.7 .3

1.2 .8

B = .5 .6

.3 1.4

Solution:

a) A=1.7 .3

1.2 .8

The characteristic equation is as follow:

Page 26: Linear Algebra - Solved Assignments - Fall 2006 Semester

2

2

2

22

| | 0

1.7 .30

1.2 .8

(1.7 )(.8 ) ( .3)( 1.2) 0

1.36 1.7 .8 0.36 0

1 2.5 0

2.5 1 0

the quardetic equation to find the value of .

( 2.5) ( 2.5) 4(1)(1)-b b 4 2.5 6=

2 2(1)

A I

Applying

ac

a

1

.25 4

2

2.5 2.25 2.5 1.5

2 2

2.5 1.5 2.5 1.5 4 1, ,

2 2 2 2

2,0.5

=2>1 and =0.5<1, hence it a saddle point of the dynamic system K K

As Ax x

b) B=.5 .6

.3 1.4

Solution: The characteristic equation is as follow:

Page 27: Linear Algebra - Solved Assignments - Fall 2006 Semester

2

2

22

| | 0

.5 .60

.3 1.4

(.5 )(1.4 ) (.6)( .3) 0

0.7 .5 1.4 .18 0

1.9 0.88 0

the quardetic equation,

( 1.9) ( 1.9) 4(1)(0.88)-b b 4 1.9 3.61 3.52=

2 2(1) 2

1.9 0.09 1.9 0.3

2 2

1.9

B I

Applying

ac

a

1

0.3 1.9 0.3,

2 2

2.2 1.6,

2 2

1.1,0.8

=1.1>1 and =0.8<1. Hence it is a saddle point for the dynamic System .K K

As Ax x

(b) Solve the initial value problem /( ) ( )t Ax tx for t 0 with

0

3

2x

and A = 1 2

3 4

Solution:

Page 28: Linear Algebra - Solved Assignments - Fall 2006 Semester

2

2

2

1

2

|A- I|=0

1- -20

3 -4-

(1 )( 4 ) ( 2)(3) 0

4 4 6 0

3 2 0

2 2 0

( 2) 1( 2) 0

( 2)( 1) 0

2, 1

eigen vectors corresponding to 2

1 ( 2) 2 0

3 4 ( 2) 0

3 2 0

3 2 0

As

The

x

x

2 1

1 2

2 2

1

1

1

1

2

3 2 0~

0 0 0

3 2 0

x as x is a free variable.

3 2 0

3 2

2

3

2 22

3 33

1

corresponding to the eigen value =-1

1-(-1) -2

3 -3

R R

x x

Take p

x p

x p

x p

x pp p

xp

Eigenvectors

1

2

x

x

Page 29: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2

2 1

1 2

2 2

1 2

1

1

1

2

1 1 2 2

1

2 2 0 1 1 0 1 1~ ,

3 3 0 1 1 0 2 3

1 1 0~

0 0 0

0

x as x is a free variable.

0

0

1

1

,

( )

t=0

3 2

2 3

t t

R R

R R

x x

Take t

x x

x t

x t

x tt

x t

So

x t a e x a e x

Initially

a

2

1 2

1 2

1 2

1 2

1

1

2

2

2

1

1

23

2 3

2 3......(1)

3 2......(2)

subtrating 2 from 1, we get a 1

this value of a in equation 1.

2(-1)+a 3

3 2 5

2 1( ) 5

3 1

t t

a

a a

a a

a a

a a

By

Put

a

x t e e

Page 30: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File of Assignment No. 7 (Linear Algebra) FALL SEMESTER 2006 Question # 1

Apply the Power Method to A = 2 1

4 5

with 0

1

0x

to estimate

the dominant eigenvalue.Stop when K=5

Solution:

Question # 2

(a) Determine whether the set S= {1 2 3, ,u u u } is an orthogonal set?

0

0 0

1 0

0

1 1

2 1

1

2

Ax

2 1 1 2, 4

4 5 0 4

2 .51 1x

4 14

2 1 .5 1 1 2, 7

4 5 1 2 5 7

2 0.28571 1

7 17

2 1 0.2857

4 5 1

First Compute

Ax

Ax

Ax

x Ax

Ax

2

3 2

2

3 3

0.5714 1 1.5714, 6.1428

1.1428 5 6.1428

1.5714 0.25581 1

6.1428 16.1428

2 1 0.2558 0.5116 1 1.5116, 6.

4 5 1 1.0232 5 6.0232

x Ax

Ax

4 3

3

4 4

5 4

4

0232

1.5116 0.25091 1

6.0232 16.0232

2 1 0.2509 0.5018 1 1.5018, 6.0036

4 5 1 1.0036 5 6.0036

1.5018 0.25011 1

6.0036 16.0036

x Ax

Ax

x Ax

Ax

5 5

2 1 0.2501 0.5002 1 1.5002, 6.0004

4 5 1 1.0004 5 6.0004

Page 31: Linear Algebra - Solved Assignments - Fall 2006 Semester

Where 1 2 3

1 0 5

2 , 1 , 2

1 2 1

u u u

Solution:

1 2 3

1 2

1 3

1 0 5

2 , 1 , 2

1 2 1

we calculate the products pairs of distinct vectors to check whether the set is orthagonal

or not.

1 0

u . 2 . 1 0 2 2 0

1 2

1

u .

u

u

u u u

2 3

5

2 . 2 5 4 1 0

1 1

0 5

. 1 . 2 0 2 2 0

2 1

, the given set is orthagonal.

u u

So

(b) Show that the set S= {1 2,u u } is an orthogonal basis for

2

R ?

Express the vector y=6

3

as a linear combination of the vectors in S

Where 1 2

3 2

1 6andu u

Solution:

Page 32: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2

1 2

1

2

1 1

2 2

The set s will be orthagonal if u .u 0.

3 2. . 6 6 0

1 6

, is orthagonal set.

Now,

6 3y.u . 18 3 15

3 1

6 2. . 12 18 30

3 6

3 3. . 9 1 10

1 1

.

u u

So it

y u

u u

u u

1 21 2 1 2

1 1 2 2

1 2

2 2. 4 36 40.

6 6

,

. . 15 30. .

. . 10 40

3 3

2 4

Now

y u y uy u u u u

u u u u

y u u

Question # 3

Let y=1 2

5 3 3

9 , 5 , 2

5 1 1

u u

.Find the distance from y to the plane

in 3

R spanned by1 2andu u .

Solution:

Page 33: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2

1 21 2

1 1 2 2

1

1 1

2

5 3 3

9 , 5 , 2

5 1 1

. .ˆ . .

. .

5 3

. 9 . 5 15 45 5 35

5 1

3 3

. 5 . 5 9 25 1 35

1 1

5 3

. 9 . 2

5 1

y u y uy u u

u u u u

y u

u u

y u

u u

2 2

1 21 2

1 1 2 2

15 18 5 28

3 3

. 2 . 2 9 4 1 14

1 1

putting these values in the formula below:

. .ˆ . .

. .

3 3 335 28

ˆ 5 2 5 ( 235 14

1 1 1

u u

Now

y u y uy u u

u u u u

y

2

3 3 6 3

) 2 5 4 9

1 1 2 1

5 3 2

ˆ 9 9 0

5 1 6

ˆ 4 0 36 40

ˆ 40 2 2 10 2 10

the distance of y from is 2 10.

y y

y y

y y x x

Hence W

Page 34: Linear Algebra - Solved Assignments - Fall 2006 Semester

Solution File Assignment No.8

Linear Algebra (Fall Semester 2006)

Question # 1

Consider the basis S= {1 2 3, ,u u u } for

3

R .Where

1 2 3

1 0 1

1 , 1 , 2

1 1 3

u u u

Use the Gram-Schmidt Process to transfer S to an orthonormal basis

for 3

R

Solution:

Step 1

1 1

1

1

1

v u

Step 2

1

2 12 2 2 2 12

1

.w

u vv u proj u u v

v

2 1

0 1

. 1 . 1 0(1) 1(1) 1(1) 2

1 1

u v

2

1 1 1 1 3v

2

0 1 0 2 / 32

1 1 1 2 / 33

1 1 1 2 / 3

v

2

2 / 3

1/ 3

1/ 3

v

Step 3

2

3 1 3 2

3 3 3 3 1 22 2

1 2

. .w

u v u vv u proj u u v v

v v

Page 35: Linear Algebra - Solved Assignments - Fall 2006 Semester

3 1

3 2

3 2

2

2

1 1

. 2 . 1 1(1) 2(1) 3(1) 6

3 1

1 2 / 32 1 1

. 2 . 1/ 3 1( ) 2( ) 3( )3 3 3

3 1/ 3

2 2 3 2 2 3. 1

3 3 3 3

4 1 1 4 1 1 6 2

9 9 9 9 9 3

u v

u v

u v

v

3

3

3

3

1 1 2 / 36 1

2 1 1/ 33 2 / 3

3 1 1/ 3

1 1 2 / 33

2 2 1 1/ 32

3 1 1/ 3

1 2 6 / 6

2 2 3/ 6

3 2 3/ 6

1 6 / 6

0 3/ 6

1 3/ 6

v

v

v

v

3

3

1 6 / 6

0 3/ 6

1 3/ 6

0

1/ 2

1/ 2

v

v

Thus

1

1

1

1

v

, v2 =

2 / 3

1/ 3

1/ 3

, v3 =

0

1/ 2

1/ 2

These are the orthogonal basis for 3R .

Now we have to find the orthonormal basis 3R

Page 36: Linear Algebra - Solved Assignments - Fall 2006 Semester

2 2 2

1

2 2 2

2

2 2

3

(1) (1) (1) 1 1 1 3

2 1 1 6

3 3 3 3

1 1 20

2 2 2

v

v

v

1

1

1

2

2

2

3

3

3

1/ 3

1/ 3

1/ 3

2 / 6

1/ 6

1/ 6

0

1

2

1

2

vq

v

vq

v

vq

v

Question # 2

The orthogonal basis for the columns space of the matrix

A =

3 5 1

1 1 1

1 5 2

3 7 8

is given by

3 1 3

1 3 1, ,

1 3 1

3 1 3

.Find a QR-factorization of the above matrix

A. Solution:

Let

Page 37: Linear Algebra - Solved Assignments - Fall 2006 Semester

1 2 3

3 1 3

1 3 1, ,

1 3 1

3 1 3

v v v

Normalize the three vectors to obtain u1, u2, u3.

1 1

1

320

31

11 1 20

1 12020

33

20

u vv

2 2

2

120

13

31 1 20

3 32020

11

20

u vv

3 3

3

320

31

11 1 20

1 12020

33

20

u vv

QR Factorization:

3 3120 20 20

31 120 20 20

31 120 20 20

3 3120 20 20

Q

As R=T

Q A

So take the transport of the above matrix ,

Page 38: Linear Algebra - Solved Assignments - Fall 2006 Semester

3 31 120 20 20 20

3 31 120 20 20 20

3 31 120 20 20 20

TQ

3 31 1 3 5 120 20 20 20

1 1 13 31 1

20 20 20 20 1 5 2

3 31 1 3 7 820 20 20 20

3 5 13 1 1 3

1 1 111 3 3 1

1 5 2203 1 1 3

3 7 8

9+1+1+9 15 1 5 21 3 1 2 241

3 3 3 3 -5+3+5+7 1 3 6 820

9

R

R

1 1 9 15+1+5-21 3 1 2 24

20 40 261

0 20 220

0 0 24

R

Question # 3

Find the Least Square solution and its error, where

A =

2 1

2 0

2 3

and b=

5

8

1

Solution:

2 12 -2 2 4 4 4 2 0 6 12 8

2 01 0 3 2 0 6 1 0 9 8 10

2 3

TA A

52 -2 2 10 16 2 26 2 24

81 0 3 5 0 3 5 3 2

1

TA b

Then the equation T TA A A b becomes

Page 39: Linear Algebra - Solved Assignments - Fall 2006 Semester

1

2

12 8 24

8 10 2

x

x

1 10 81

8 1256

TA A

1

ˆ

10 8 241

8 12 256

240 161 =

192 2456

224 41

168 356

3

T Tx A A A b

x

Now

2 1 8 3 54

ˆ 2 0 8 0 83

2 3 8 9 1

Ax

Hence,

5 5 5 5 0

ˆ 8 8 8 8 0

1 1 1 1 0

b Ax

And

ˆ 0

b Ax

The least square error is 0