0% found this document useful (0 votes)
3 views

Linear Systems Direct Methods II Problem Sheet Solutions

The document provides detailed solutions to various problems related to linear systems and direct methods in scientific computation. Each problem is approached by manipulating augmented matrices through row operations to arrive at solutions. The solutions include step-by-step transformations and calculations, demonstrating techniques such as row interchanges and scaling factors.

Uploaded by

王健
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Linear Systems Direct Methods II Problem Sheet Solutions

The document provides detailed solutions to various problems related to linear systems and direct methods in scientific computation. Each problem is approached by manipulating augmented matrices through row operations to arrive at solutions. The solutions include step-by-step transformations and calculations, demonstrating techniques such as row interchanges and scaling factors.

Uploaded by

王健
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

MATH2033 (2023–2024)

Introduction to Scientific Computation

Linear Systems: Direct Methods II

PROBLEM SHEET SOLUTIONS

Solution to Problem 1
a We start with the augmented matrix

1 −5
 
1 7
 10 0 20 6  .
5 0 −1 4
10
We perform R2 − 1
R1 → R2 and R3 − 51 R1 → R3 to obtain

1 −5
 
1 7
 0 50 10 −64  .
0 25 −6 −31
25
We perform R3 − R
50 2
→ R3 to obtain

1 −5
 
1 7
 0 50 10 −64  .
0 0 −26 97

b We start with the augmented matrix

1 −5
 
1 7
 10 0 20 6  .
5 0 −1 4
Since max{|1|, |10|, |5|} = 10, we perform R1 ↔ R2 to obtain
 
10 0 20 6
 1 −5 1 7 .
5 0 −1 4
1 5
We perform R2 − R
10 1
→ R2 and R3 − 10 R1 → R3 to obtain
 
10 0 20 6
 0 −5 −1 6.4  .
0 0 −11 1

Page 1 of 9
Since max{| − 5|, |0|} = 5, we do not interchange rows. We perform
0
R3 − −5 R2 → R3 to obtain
 
10 0 20 6
 0 −5 −1 6.4  .
0 0 −11 1

c We start with the augmented matrix

1 −5
 
1 7
 10 0 20 6  .
5 0 −1 4

The scale factors are s1 = max{|1|, | − 5|, |1|} = 5, s2 =


max{|10|,
n |0|, |20|}
o = 20 and s3 = max{|5|, |0|, | − 1|} = 5. Since
|1| |10| |5| |5|
max 5
, 20 , 5 = 5
, we perform R1 ↔ R3 to obtain

0 −1 4
 
5
 10 0 20 6 
1 −5 1 7
10
and note that now s1 = 5, s2 = 20 and s3 = 5. We perform R2 − 5
R1 →
R2 and R3 − 15 R1 → R3 to obtain

0 −1
 
5 4
 0 0 22 −2  .
0 −5 1.2 6.2
n o
|0| |−5| |−5|
Since max 20
, 5 = 5
, we perform R2 ↔ R3 to obtain

0 −1
 
5 4
 0 −5 1.2 6.2 
0 0 22 −2
0
and note that now s2 = 5 and s3 = 20. We perform R3 − R
−5 2
→ R3 to
obtain
0 −1
 
5 4
 0 −5 1.2 6.2  .
0 0 22 −2

d We start with the augmented matrix

1 −5
 
1 7
 10 0 20 6  .
5 0 −1 4

Page 2 of 9
Since max{|1|, | − 5|, |1|, |10|, |0|, |20|, |5|, |0|, | − 1|} = 20, we perform
R1 ↔ R2 to obtain  
10 0 20 6
 1 −5 1 7 
5 0 −1 4
and then perform C1 ↔ C3 to obtain
 
20 0 10 6
 1 −5 1 7 
−1 0 5 4

and note that the solution to the linear system corresponding to this aug-
mented matrix is  
x3
 x2  .
x1
1 −1
We perform R2 − R
20 1
→ R2 and R3 − R
20 1
→ R3 to obtain
 
20 0 10 6
 0 −5 0.5 6.7  .
0 0 5.5 4.3

Since max {| − 5|, |0.5|, |0|, |5.5|} = 5.5, we perform R2 ↔ R3 to obtain


 
20 0 10 6
 0 0 5.5 4.3 
0 −5 0.5 6.7

and then perform C2 ↔ C3 to obtain


 
20 10 0 6
 0 5.5 0 4.3 
0 0.5 −5 6.7

and note that the solution to the linear system corresponding to this aug-
mented matrix is  
x3
 x1  .
x2
0.5
We perform R3 − R
5.5 2
→ R3 to obtain
 
20 10 0 6
 0 5.5 0 4.3 .
0 0 −5 6.30909 . . .

Page 3 of 9
Solution to Problem 2
a We start with the augmented matrix

1 −1 1
 
1
 1 1 4 2 .
2 −1 2 3

We perform R2 − 11 R1 → R2 and R3 − 21 R1 → R3 to obtain

1 −1 1
 
1
 0 0 5 1 .
0 −3 4 1
We perform R2 ↔ R3 to obtain

1 −1 1
 
1
 0 −3 4 1 .
0 0 5 1
0
We perform R3 − R
−3 2
→ R3 to obtain

1 −1 1
 
1
 0 −3 4 1 .
0 0 5 1

b We start with the augmented matrix

1 −1 1
 
1
 1 1 4 2 .
2 −1 2 3

Since max{|1|, |1|, |2|} = 2, we perform R1 ↔ R3 to obtain

2 −1
 
2 3
 1 1 4 2 .
1 1 −1 1

We perform R2 − 12 R1 → R2 and R3 − 12 R1 → R3 to obtain

2 −1
 
2 3
 0 1.5 3 0.5  .
0 1.5 −2 −0.5

Since max{|1.5|, |1.5|} = 1.5, we do not interchange rows. We perform


R3 − 11 R2 → R3 to obtain

2 −1
 
2 3
 0 1.5 5 3.5  .
0 0 −5 −1

Page 4 of 9
c We start with the augmented matrix

1 −1 1
 
1
 1 1 4 2 .
2 −1 2 3

The scale factors are s1 = max{|1|, |1|, | − 1|} = 1, s2 =


n |1|, |4|}o = 4 and s3 = max{|2|, | − 1|, |2|} = 2. Since
max{|1|,
|1| |1| |2| |1|
max 1
, 4, 2 = 1
, we do not interchange rows. We perform R2 −
1 2
R
1 1
→ R2 and R3 − R → R3 to obtain
1 1

1 −1 1
 
1
 0 0 5 1 .
0 −3 4 1
n o
|0| |−3| |−3|
Since max 4
, 2 = 2
, we perform R2 ↔ R3 to obtain

1 −1 1
 
1
 0 −3 4 1 
0 0 5 1
0
and note that now s2 = 2 and s3 = 4. We perform R3 − R
−3 2
→ R3 to
obtain
1 −1 1
 
1
 0 −3 4 1 .
0 0 5 1

d We start with the augmented matrix

1 −1 1
 
1
 1 1 4 2 .
2 −1 2 3

Since max{|1|, |1|, | − 1|, |1|, |1|, |4|, |2|, | − 1|, |2|} = 4, we perform R1 ↔
R2 to obtain  
1 1 4 2
 1 1 −1 1 
2 −1 2 3
and then perform C1 ↔ C3 to obtain
 
4 1 1 2
 −1 1 1 1 
2 −1 2 3

Page 5 of 9
and note that the solution to the linear system corresponding to this aug-
mented matrix is  
x3
 x2  .
x1
−1
We perform R2 − 4
R1 → R2 and R3 − 24 R1 → R3 to obtain
 
4 1 1 2
 0 1.25 1.25 1.5  .
0 −1.5 1.5 2

Since max {|1.25|, |1.25|, | − 1.5|, |1.5|} = 1.5, we perform R2 ↔ R3 to


obtain  
4 1 1 2
 0 −1.5 1.5 2  .
0 1.25 1.25 1.5
1.25
We perform R3 − R
−1.5 2
→ R3 to obtain
 
4 1 1 2
 0 −1.5 1.5 2 .
0 0 2.5 3.16666 . . .

Solution to Problem 3
a We start with the augmented matrix
 
0.03 58.9 59.2
.
5.31 −6.10 47.0

Using 3-digit arithmetic with rounding yields

5.31 0.03 = 177,

−6.10 177⊗58.9 = −6.10 f l(10425.3) = −6.10 10400 = f l(−10431.4) = −10400


and

47.0 177⊗59.2 = 47.0 f l(10478.4) = 47.0 10500 = f l(−10453) = −10500.

So performing R2 − 5.31 R → R2 using 3-digit arithmetic with rounding


0.03 1
yields  
0.03 58.9 59.2
.
0 −10400 −10500
Performing backward substitution using 3-digit arithmetic with rounding
yields
x2 = (−10500) (−10400) = f l(1.009) = 1.01

Page 6 of 9
and

x1 = (59.2 58.9 ⊗ x2 ) 0.03


= (59.2 f l(59.48)) 0.03
= (59.2 59.5)) 0.03
= (−0.3) 0.03
= −10.0.

b We start with the augmented matrix


 
0.03 58.9 59.2
.
5.31 −6.10 47.0

Since max{|0.03|, |5.31|} = 5.31, we perform R1 ↔ R2 to obtain


 
5.31 −6.10 47.0
.
0.03 58.9 59.2

Using 3-digit arithmetic with rounding yields

0.03 5.31 = f l(0.005649) = 0.00565,

58.9 0.00565⊗(−6.10) = 58.9 f l(−0.03446) = 58.9 (−0.0345) = f l(58.93) = 58.9


and

59.2 0.00565⊗47.0 = 59.2 f l(0.2655) = 59.2 0.266 = f l(58.93) = 58.9


0.03
So performing R2 − R
5.31 1
→ R2 using 3-digit arithmetic with rounding
yields  
5.31 −6.10 47.0
.
0 58.9 58.9
Performing backward substitution using 3-digit arithmetic with rounding
yields
x2 = 58.9 58.9 = 1.00
and

x1 = (47.0 (−6.10)⊗x2 ) 5.31 = (47.0 (−6.10)) 5.31 = 53.1 5.31 = 10.0.

c We start with the augmented matrix


 
0.03 58.9 59.2
.
5.31 −6.10 47.0

Using 3-digit arithmetic with chopping yields

5.31 0.03 = 177,

Page 7 of 9
−6.10 177⊗58.9 = −6.10 f l(10425.3) = −6.10 10400 = f l(−10406.1) = −10400
and

47.0 177⊗59.2 = 47.0 f l(10478.4) = 47.0 10400 = f l(−10353) = −10300.

So performing R2 − 5.31 R → R2 using 3-digit arithmetic with chopping


0.03 1
yields  
0.03 58.9 59.2
.
0 −10400 −10300
Performing backward substitution using 3-digit arithmetic with chopping
yields
x2 = (−10300) (−10400) = f l(0.9903) = 0.990
and

x1 = (59.2 58.9 ⊗ x2 ) 0.03


= (59.2 f l(58.31)) 0.03
= (59.2 58.3) 0.03
= 0.9 0.03
= 30.0.

d We start with the augmented matrix


 
0.03 58.9 59.2
.
5.31 −6.10 47.0

Since max{|0.03|, |5.31|} = 5.31, we perform R1 ↔ R2 to obtain


 
5.31 −6.10 47.0
.
0.03 58.9 59.2

Using 3-digit arithmetic with chopping yields

0.03 5.31 = f l(0.005649) = 0.00564,

58.9 0.00564⊗(−6.10) = 58.9 f l(−0.03440) = 58.9 (−0.0344) = f l(58.93) = 58.9


and

59.2 0.00564⊗47.0 = 59.2 f l(0.2650) = 59.2 0.265 = f l(58.93) = 58.9


0.03
So performing R2 − R
5.31 1
→ R2 using 3-digit arithmetic with chopping
yields  
5.31 −6.10 47.0
.
0 58.9 58.9

Page 8 of 9
Performing backward substitution using 3-digit arithmetic with chopping
yields
x2 = 58.9 58.9 = 1.00
and

x1 = (47.0 (−6.10)⊗x2 ) 5.31 = (47.0 (−6.10)) 5.31 = 53.1 5.31 = 10.0.

References

• Burden, Faires & Burden, Numerical Analysis, 10E

– Section 6.2

Page 9 of 9

You might also like