Tema 3.. en

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

Subscribe to DeepL Pro to edit this document.

Visit www.DeepL.com/pro for more information.

Career: Industrial Engineering

Subject: Linear Algebra.

Topic 3: System of linear equations.

Group: 3b2B

Teacher: Miguel Ángel Herrera Hernández

Research report Spanish - English.

Presents team #1:


Gómez Rodríguez José Alfredo
Ortega Maritano Saul Axel
Quiroz Coba Kevin
Santiago Neri José de Jesús
Velázquez Trejo Christian Dalai

Observations: All team members contributed to the completion of this


research.

Date: October 13, 2023


INDEX
Stationary and non-stationary Iterative Methods ......................................................................... 13
Jacobi method ............................................................................................................................. 13
GAUSS-Seidel method .................................................................................................................. 13
SOR method................................................................................................................................. 13
Upright Method ........................................................................................................................... 13
Bibliographies .............................................................................................................................. 16

Stationary and non-stationary Iterative


Methods
Jacobi's method
GAUSS-Seidel Method
The Gauss-Seidel Method consists of making iterations, starting from an initial
vector, to find the values of the unknowns until reaching a desired tolerance,
the difference is that each time you want to find a new value of an xi , in
addition to using the previous values of the x, it also uses current values of
the x found before (from x0 to x ).i-1

𝒊−𝟏 𝒏
(𝒌) (𝒌−𝟏)
𝒙𝒊 = (𝒃𝒊 − ∑ 𝒂𝒊𝒋 𝒙𝒌𝒋 − ∑ 𝒂𝒊𝒋 𝒙𝒋 )/𝒂𝒊𝒋
𝒋=𝟏 𝒋=𝒊+𝟏

The Gauss-Seidel method emerged as a modification of the Jacobi method


that accelerates the convergence of the latter.

The Gauss-Seidel method substantially reduces the number of iterations to


be performed to obtain a certain precision in the solution. Evidently the
convergence criteria are similar to those of Jacobi.

This criterion applies not only to the linear equations solved with the Gauss-
Seidel method but also for the iterative fixed point method and the Jacobi
method. Therefore, by applying this criterion on the Gauss-Seidel equations
and evaluating with respect to each of the unknowns, we obtain the following
expression:

𝒂𝟐𝟏 𝒂𝟏𝟐
| |<𝟏 | |<𝟏
𝒂𝟐𝟐 𝒂𝟏𝟏

The absolute value of the slopes in the equation must be less than unity to
ensure convergence.

|𝒂𝟐𝟐 | > |𝒂𝟐𝟏 | |𝒂𝟏𝟏 | > |𝒂𝟏𝟐 |

That is, the diagonal element must be greater than the off-diagonal element
for each row of equations. The generalization of the above criterion for a
system of n equations is:
𝒏
|𝒂𝒊𝒊 | > ∑|𝒂𝒊,𝒋|
𝒋=𝟏
𝒋≠𝒊

The Gauss-Seidel method is based on the fixed point concept, i.e. (xi=gi(x),
i=1..n), to solve systems of linear equations. To guarantee convergence it
must be fulfilled that the system has a dominant diagonal, that is to say that
the following inequality is fulfilled, if the order of the equations is changed this
can diverge.
𝒏

𝒂𝟏𝟏 > ∑ 𝒂𝒊𝒋


𝒊=𝟏
𝒋≠𝒊

Example

Solve the following system of equations by the Gauss-Seidel method using a

ξ= 0.001.

𝟎. 𝟏𝒙𝟏 + 𝟕. 𝟎𝒙𝟐 − 𝟎. 𝟑𝒙𝟑 = −𝟏𝟗. 𝟑𝟎

𝟑. 𝟎𝒙𝟏 − 𝟎. 𝟏𝒙𝟐 − 𝟎. 𝟐𝒙𝟑 = 𝟕. 𝟖𝟓

𝟎. 𝟑𝒙𝟏 − 𝟎. 𝟐𝒙𝟐 − 𝟏𝟎𝒙𝟑 = 𝟕𝟏. 𝟒𝟎

Solution

First we order the equations, so that in the main diagonal are the largest
coefficients to ensure convergence.

𝟑. 𝟎𝒙𝟏 − 𝟎. 𝟏𝒙𝟐 − 𝟎. 𝟐𝒙𝟑 = 𝟕. 𝟖𝟓

𝟎. 𝟏𝒙𝟏 + 𝟕. 𝟎𝒙𝟐 − 𝟎. 𝟑𝒙𝟑 = −𝟏𝟗. 𝟑𝟎

𝟎. 𝟑𝒙𝟏 − 𝟎. 𝟐𝒙𝟐 − 𝟏𝟎𝒙𝟑 = 𝟕𝟏. 𝟒𝟎

We clear each of the variables on the diagonal:

𝟕. 𝟖𝟓 + 𝟎. 𝟏𝒙𝟐 + 𝟎. 𝟐𝒙𝟑
𝒙𝟏 =
𝟑
−𝟏𝟗. 𝟑𝟎 − 𝟎. 𝟏𝒙𝟏 + 𝟎. 𝟑𝒙𝟑
𝒙𝟐 =
𝟕
𝟕𝟏. 𝟒𝟎 − 𝟎. 𝟑𝒙𝟏 + 𝟎. 𝟐𝒙𝟐
𝒙𝟑 =
𝟏𝟎

We assume the initial values 𝒙𝟐 = 𝟎 y 𝒙𝟑 = 𝟎 and calculate 𝒙𝟏

𝟕. 𝟖𝟓
𝒙𝟎𝟏 = = 𝟐. 𝟔𝟏𝟔 𝟔𝟔𝟔
𝟑
This value together with the value of 𝒙𝟑 can be used to obtain 𝒙𝟐 .

−𝟏𝟗. 𝟑 − 𝟎. 𝟏(𝟐. 𝟔𝟏𝟔 𝟔𝟔𝟔)


𝒙𝟎𝟐 = = −𝟐. 𝟕𝟗𝟒 𝟓𝟐𝟑
𝟕
The first iteration is completed by substituting the calculated values of X1 and
X2 and obtaining:

𝟕𝟏. 𝟒 − 𝟎. 𝟑(𝟐. 𝟔𝟏𝟔 𝟔𝟔𝟔) + 𝟎. 𝟐(−𝟐. 𝟕𝟗𝟒 𝟓𝟐𝟑)


𝒙𝟎𝟑 = = 𝟕. 𝟎𝟎𝟓 𝟔𝟎𝟗
𝟏𝟎

In the second iteration, the same procedure is repeated:

𝟕. 𝟖𝟓 + 𝟎. 𝟏(−𝟐. 𝟕𝟗𝟒 𝟓𝟐𝟑) + 𝟎. 𝟐(𝟕. 𝟎𝟎𝟓 𝟔𝟎𝟗)


𝒙𝟏𝟏 = = 𝟐. 𝟗𝟗𝟎 𝟓𝟓𝟔
𝟑
−𝟏𝟗. 𝟑 − 𝟎. 𝟏(𝟐. 𝟗𝟗𝟎 𝟓𝟓𝟔) + 𝟎. 𝟑(𝟕. 𝟎𝟎𝟓 𝟔𝟎𝟗)
𝒙𝟏𝟐 = = −𝟐. 𝟒𝟗𝟗 𝟔𝟐𝟒
𝟕
𝟕𝟏. 𝟒 − 𝟎. 𝟑(𝟐. 𝟗𝟎𝟎 𝟓𝟓𝟔) + 𝟎. 𝟐(−𝟐. 𝟒𝟗𝟗 𝟔𝟐𝟒)
𝒙𝟏𝟑 = = 𝟕. 𝟎𝟎𝟎 𝟐𝟗𝟎
𝟏𝟎

Comparing the values calculated between the first and the second iteration

|𝑥11 − 𝑥10 | = |2.990 556 − 2.616 666| = 0.373 890

|𝑥21 − 𝑥20 | = |−2.499 624 − (−2.794 523)| = 0.294 899

|𝑥31 − 𝑥30 | = |7.000 290 − 7.005 609| = 0.005 319

As we can see, the condition

|𝑥11 − 𝑥10 | ≤ 𝜀 For 𝑖 = 1, 2, 3

We then take the values calculated in the last iteration and take them as
assumptions for the next iteration. The process is then repeated:

7.85 + 0.1(−2.499 624) + 0.2(7.000 290)


𝑥12 = = 3.000 031
3
−19.3 − 0.1(3.000 031) + 0.3(7.000 290)
𝑥22 = = −2.499 988
7
71.4 − 0.3(3.000 031) + 0.2(−2.499 988)
𝑥32 = = 6.999 999
10

Comparing again the values obtained

|𝑥12 − 𝑥11 | = |3.000 031 − 2.990 556| = 0.009 475

|𝑥22 − 𝑥21 | = |−2.499 988 − (−2.499 988)| = 0.000 364

|𝑥32 − 𝑥31 | = |6.999 999 − 7.000 290| = 0.000 291

As can be seen, the following condition has not yet been met

|𝑥𝑖2 − 𝑥𝑖1 | ≤ 𝜀 For 𝑖 = 1, 2, 3

So we do another iteration

7.85 + 0.1(−2.499 988) + 0.2(6.999 999)


𝑥13 = = 3.000 000
3
−19.3 − 0.1(3.000 000) + 0.3(6.999 999)
𝑥23 = = −2.500 000
7
71.4 − 0.3(3.000 000) + 0.2(−2.500 000)
𝑥33 = = 7.000 000
10

Comparing the values obtained

|𝑥13 − 𝑥12 | = |3.000 000 − 3.000 031| = 0.000 031

|𝑥23 − 𝑥22 | = |−2.500 000 − (−2.499 988)| = 0.000 012

|𝑥33 − 𝑥32 | = |7.000 000 − 6.999 999| = 0.000 001

Comparing the values obtained

𝑥1 = 3.0

𝑥2 = −2.5

𝑥3 = 7.0

SOR method
Upright Method
The Montante Method was discovered in 1973, named after its discoverer, René
Mario Montante Pardo. The Montante Method is a linear algebra algorithm for
determining the solutions of a system of linear equations, finding inverse matrices,
adjoint matrices and determinants. The method consists of "pivoting" on the main
diagonal. The line where the pivot is will be the base line of the whole system and
the column where the pivot is will be the base column. With respect to that line and
that column, where the pivot is, determinants of two by two are formed, and we
always work with whole numbers, if any fraction appears there is an error. The main
characteristic of the Upright Method is that it works with integers.

Example:

We have the following equations...

3𝑥1 – 2𝑥2 + 𝑥3 = 2

4𝑥1 + 3𝑥2 – 5𝑥3 = 4

2𝑥1 + 𝑥2 – 𝑥3 = 3

Solution

Start by making the previous pivot equal to 1.

The following pivots will be obtained on the main diagonal of the augmented
matrix.

The first pivot is element 3.

Then zeros must be made in the pivot column (zeros above and below it).

Whereas the pivot row continues with the same values

The following equation is applied to obtain the new matrix elements that are
needed:

It is solved by multiplying the element by the pivot, minus the product of the two
elements of the row and the column where the pivot is and the element between
the previous pivot.
New Element=(Current Pivot)(Current Element)-(Pivot Column Element)(Pivot Row
Element)/Previous Pivot

((3)(3) − (−2)(4))
𝑁𝐸(2,2) = = 17
1
((3)(−5) − (1)(4))
𝑁𝐸(2,3) = = −19
1
((3)(4) − (2)(4))
𝑁𝐸(2,4) = =4
1
((3)(1) − (2)(2))
𝑁𝐸(3,2) = =7
1
((3)(−1) − (1)(2))
𝑁𝐸(3,3) = = −5
1
((3)(3) − (2)(2))
𝑁𝐸(3,4) = =5
1

3 −2 1 |2
|0 17 −19 |4 |
0 7 −5 |5

The previous pivot will now be 3

The current pivot will change to 17

The elements above and below the current pivot will be 0

The new elements of the new matrix will be obtained with the same formula.

Finally, the previous pivot that was 3 changes to 17.

((17)(1) − (−2)(−19))
𝑁𝐸(1,3) = = −7
3
((17)(2) − (−2)(4))
𝑁𝐸(1,4) = = 14
3
((17)(−5) − (7)(−19))
𝑁𝐸(3,3) = = 16
3
((17)(5) − (7)(4))
𝑁𝐸(3,4) = = 19
3
17 0 −7 |14
|0 17 −19 |4 |
0 0 16 |19

The previous pivot will now be 17

The current pivot will be 16

The elements above the pivot will be 0

The new elements of the new matrix will be obtained with the same formula.

The previous pivots that are 17 will change to the current pivot 16.

((16)(14) − (−7)(19))
𝑁𝐸(1,4) = = 21
17
((16)(4) − (−19)(19))
𝑁𝐸(2,4) = = 25
17

16 0 0 |21
| 0 16 0 |25|
0 0 16 |19

At the end of the matrix we find the values of 𝑥, 𝑦, 𝑧, these are the elements that are
left over between the last pivot:

𝑋 = 21/16

𝑌 = 25/16

𝑍 = 19/16

Bibliographies
https://metodosnumericos121.wordpress.com/metodo-de-
montante/#:~:text=The%20M%C3%A9all%20of%20Montante%20is,pivoting%C2%BB%20on%20th
e%20main%20diagonal%20.

https://metnum2016.wordpress.com/2016/10/11/228/

https://esimecuanalisisnumerico.wordpress.com/2014/05/05/metodo-de-gauss-seidel/
Career: Industrial Engineering

Subject: Linear Algebra.

Topic 3: System of linear equations.

Group: 3b2B

Teacher: Miguel Ángel Herrera Hernández

Research report Spanish - English.

Presents team #1:


Gómez Rodríguez José Alfredo
Ortega Maritano Saul Axel
Quiroz Coba Kevin
Santiago Neri José de Jesús
Velázquez Trejo Christian Dalai

Observations: All team members contributed to the completion of this


research.

Date: October 28, 2023


Stationary and non-stationary Iterative
Methods
Jacobi method
GAUSS-Seidel method
SOR method
Upright Method
The Montante Method was discovered in 1973, named after its discoverer, René
Mario Montante Pardo. The Montante Method is a linear algebra algorithm to
determine the solutions of a system of linear equations, find inverse matrices,
adjoint matrices and determinants. The method consists of "pivoting" on the main
diagonal. It starts at the upper left corner, the row where the pivot is will be the
base row of the entire system and the column where the pivot is will be the base
column. With respect to that row and that column, where the pivot is, two-by-two
determinants are formed, and we always work with whole numbers; if a fraction
appears, there is an error. The main characteristic of the Montante Method is that it
works with integers
Example:
We have the following equations...

3𝑥1 – 2𝑥2 + 𝑥3 = 2

4𝑥1 + 3𝑥2 – 5𝑥3 = 4

2𝑥1 + 𝑥2 – 𝑥3 = 3

Solution
Start by making the previous pivot equal to 1.
The following pivots will be obtained on the main diagonal of the augmented
matrix.
The first pivot is element 3.
Then you must make zeros in the pivot column (zeroes above and below it).
While the pivot row continues with the same values
To obtain the new elements of the matrix that are needed, the following equation is
applied:
It is solved by multiplying the element by the pivot, minus the product of the two
elements of the row and the column where the pivot and the element between the
previous pivot are.
New Element= (Current Pivot)(Current Element)-(Pivot Column Element)(Pivot
Row Element)/Previous Pivot

((3)(3) − (−2)(4))
𝑁𝐸(2,2) = = 17
1
((3)(−5) − (1)(4))
𝑁𝐸(2,3) = = −19
1
((3)(4) − (2)(4))
𝑁𝐸(2,4) = =4
1
((3)(1) − (2)(2))
𝑁𝐸(3,2) = =7
1
((3)(−1) − (1)(2))
𝑁𝐸(3,3) = = −5
1
((3)(3) − (2)(2))
𝑁𝐸(3,4) = =5
1

3 −2 1 |2
|0 17 −19 |4 |
0 7 −5 |5

The previous pivot will now be 3

The current pivot will change to 17

Elements above and below the current pivot will be 0

The new elements of the new matrix will be obtained with the same formula.

Finally, the previous pivot, which was 3, changes to 17.


((17)(1) − (−2)(−19))
𝑁𝐸(1,3) = = −7
3
((17)(2) − (−2)(4))
𝑁𝐸(1,4) = = 14
3
((17)(−5) − (7)(−19))
𝑁𝐸(3,3) = = 16
3
((17)(5) − (7)(4))
𝑁𝐸(3,4) = = 19
3

17 0 −7 |14
|0 17 −19 |4 |
0 0 16 |19

The previous pivot will now be 17

The current pivot will be 16

Elements above the pivot will be 0

The new elements of the new matrix will be obtained with the same formula.

The previous pivots that are 17 will change to the current pivot 16.

((16)(14) − (−7)(19))
𝑁𝐸(1,4) = = 21
17
((16)(4) − (−19)(19))
𝑁𝐸(2,4) = = 25
17

16 0 0 |21
| 0 16 0 |25|
0 0 16 |19

At the end of the matrix we find the values of x,y,z, these are the elements that
remain between the last pivot:
𝑋 = 21/16

𝑌 = 25/16

𝑍 = 19/16

Bibliographies

You might also like