0% found this document useful (0 votes)
28 views4 pages

Examples Matrix

The document describes using Jacobi's method and Gauss-Seidel method to solve a system of equations represented by the matrix A. It shows the iterations and decreasing errors for each method as it converges on the solution for variables xi, yi, zi. Gauss-Seidel converges faster, reaching an error of 0 within fewer iterations than Jacobi's method.

Uploaded by

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

Examples Matrix

The document describes using Jacobi's method and Gauss-Seidel method to solve a system of equations represented by the matrix A. It shows the iterations and decreasing errors for each method as it converges on the solution for variables xi, yi, zi. Gauss-Seidel converges faster, reaching an error of 0 within fewer iterations than Jacobi's method.

Uploaded by

kuyamybeloved
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd

Jacobi's Method

Matrix A
5 2 1 7
-1 4 2 3
2 -3 10 -1

Iteration xi yi zi Error xi Error yi Error Zi


0 -2.4000000000 5.0000000000 0.3000000000
1 -0.6600000000 0.0000000000 1.8800000000 1.74 5.00 1.58
2 1.0240000000 -0.3550000000 0.0320000000 1.68 0.36 1.85
3 1.5356000000 0.9900000000 -0.4113000000 0.51 1.35 0.44
4 1.0862600000 1.3395500000 -0.1101200000 0.45 0.35 0.30
5 0.8862040000 1.0766250000 0.0846130000 0.20 0.26 0.19
6 0.9524274000 0.9292445000 0.0457467000 0.07 0.15 0.04
7 1.0191528600 0.9652335000 -0.0117121300 0.07 0.04 0.06
8 1.0162490260 1.0106442800 -0.0142605220 0.00 0.05 0.00
9 0.9985943924 1.0111925175 -0.0000565212 0.02 0.00 0.01
10 0.9955342972 0.9996768587 0.0036388768 0.00 0.01 0.00
11 0.9994014812 0.9970641359 0.0007961982 0.00 0.00 0.00
12 1.0010151060 0.9994522712 -0.0007610555 0.00 0.00 0.00
13 1.0003713026 1.0006343042 -0.0003673398 0.00 0.00 0.00
14 0.9998197463 1.0002764956 0.0001160307 0.00 0.00 0.00
15 0.9998661956 0.9998969212 0.0001189994 0.00 0.00 0.00
16 1.0000174316 0.9999070492 -0.0000041628 0.00 0.00 0.00
Gauss-Seidel Matrix
MatrixA
5 2 1 7
-1 4 2 3
2 -3 10 -1

Iteration xi yi zi Error xi Error yi Error Zi


0 -2.4000000000 5.0000000000 0.3000000000
1 -0.6600000000 0.4350000000 0.1625000000 1.74 4.57 0.14
2 1.1935000000 0.9671250000 -0.0485625000 1.85 0.53 0.21
3 1.0228625000 1.0299968750 0.0044265625 0.17 0.06 0.05
4 0.9871159375 0.9945657031 0.0009465234 0.04 0.04 0.00
5 1.0019844141 1.0000228418 -0.0003900303 0.01 0.01 0.00
6 1.0000688693 1.0002122325 0.0000498959 0.00 0.00 0.00
7 0.9999051278 0.9999513340 0.0000043746 0.00 0.00 0.00
8 1.0000185915 1.0000024605 -0.0000029801 0.00 0.00 0.00
9 0.9999996118 1.0000013930 0.0000004955 0.00 0.00 0.00
10 0.9999993437 0.9999995881 0.0000000077 0.00 0.00 0.00
11 1.0000001632 1.0000000369 -0.0000000216 0.00 0.00 0.00
12 0.9999999895 1.0000000082 0.0000000045 0.00 0.00 0.00
13 0.9999999958 0.9999999967 -0.0000000002 0.00 0.00 0.00
14 1.0000000014 1.0000000004 -0.0000000001 0.00 0.00 0.00
15 0.9999999999 1.0000000000 0.0000000000 0.00 0.00 0.00
16 1.0000000000 1.0000000000 0.0000000000 0.00 0.00 0.00
Gauss Jacobi Gauss Seidel
6 6
5 5
4 4
3 3
xi xi
Solution

Solution
2 2
yi yi
1 zi 1 zi
0 0
0 2 4 6 8 10 12 0 1 2 3 4 5 6 7
-1 -1
-2 -2
-3 -3
Iteration Iteration

Gauss Jacobi Gauss Seidel


6 5
4.5
5 4
3.5
4
3 Error xi
Error xi

Erroe
2.5
Error

3 Error yi Error yi
Error Zi 2 Error Zi
2 1.5
1
1
0.5
0 0
0 2 4 6 8 10 12 0 1 2 3 4 5 6 7

Iteration Iteration
xi
yi
zi

6 7

Error xi
Error yi
Error Zi

You might also like