0% found this document useful (0 votes)
33 views14 pages

Systems of Linear Equations

A system of linear equations involves two or more linear equations with the same unknown variables. A simple example system is shown with two equations and two unknowns, x1 and x2. Gaussian elimination is introduced as a method to solve systems of linear equations by performing elementary row operations to transform the system into an upper triangular form that can then be easily solved using back substitution. The document concludes by stating that while direct methods like Gaussian elimination work for small systems, iterative methods are needed to solve very large real-world systems commonly involving thousands of unknowns.

Uploaded by

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

Systems of Linear Equations

A system of linear equations involves two or more linear equations with the same unknown variables. A simple example system is shown with two equations and two unknowns, x1 and x2. Gaussian elimination is introduced as a method to solve systems of linear equations by performing elementary row operations to transform the system into an upper triangular form that can then be easily solved using back substitution. The document concludes by stating that while direct methods like Gaussian elimination work for small systems, iterative methods are needed to solve very large real-world systems commonly involving thousands of unknowns.

Uploaded by

ahmad.nawaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Systems of Linear Equations

What is a system of linear equations?


• A simple linear equation can be written as
x - 6 = y or x - y = 6 or more generally as x1 - x2 = 6
• Note:
1. All of the above equations are the same
2. There are two unknowns
3. Each unknown is linear i.e. There are no power x12 terms
• A simple system of linear equations can be written as
4x1 + x2 = 6
x1 + 3x2 = 7
• We can use elementary maths to solve these equations
Solving the example system
4x1 + x2 = 6
x1 + 3x2 = 7
Multiply 2nd equation by 4
4x1 + x2 = 6
4x1 + 12x2 = 28
Subtract 1st equation from 2nd
11x2 = 22
x2 = 2
Substitute back into 1st equation
4x1 + 2 = 6
x1 = 1
Real-world linear system of equations
• There are many, examples where the need to solve a system of
equations is necessary to solve a more complex problem
• Examples include:
• Finding currents in network systems
• Determining the traffic in a road network
• Consumption and production problems in Economics
• Balancing chemical equations
• Predicting the flow of air over a F1 car
• Predicting weather and climate
• Predicting the stress on a microprocessor as it heats/cools
• ...
• Some of these calculations can take a long time
Real-world linear system of equations
• Order of thousands and upwards of unknowns
• One simple example application will be covered in the next
lecture
• Solution of the inverse of matrix A is impractical so must use
other techniques
• Can use direct or iterative methods to solve the resulting
system Ax = b
• We will look at the Jacobi and Gauss-Siedel methods in the next
lecture
Inverse Matrix Method
Take a system of linear equations e.g.
3 5 𝑥 13
=
1 8 𝑦 17
𝐀𝐱 = 𝐁
Find the inverse of the matrix 𝐀
𝐀 = 3 × 8 − 5 × 1 = 19,
18 −5
𝐀−1 = .
−1 3
19
𝑥 13 1 8 −5 13 1 19 1
Hence 𝑦 = 𝐀−1 = = =
17 19 −1 3 17 19 38 2
Gaussian Elimination
Using a linear system as an example:
𝑥1 + 2𝑥2 + 2𝑥3 = 11
3𝑥1 − 3𝑥2 + 4𝑥3 = 2;
6𝑥1 + 3𝑥2 − 4𝑥3 = 7
Concept: subtract a suitable multiple of one equation from another to eliminate various
variables, until arriving eventually a solution that is straightforward to solve
Gaussian Elimination
Example:
𝑥1 + 2𝑥2 + 2𝑥3 = 11
3𝑥1 − 3𝑥2 + 4𝑥3 = 2;
6𝑥1 + 3𝑥2 − 4𝑥3 = 7
1st write the system in “augmentented form”:
1 2 2 11
3 −3 4 2
6 3 −4 7
This is a compact way to represent a system of linear equations
Gaussian Elimation
There are now some functions we can do
without changing the value of x1, x2 and x3
These are known as the elementary row
operations:
▪Multiply a row by a constant
▪Swap two rows
▪Add or subtract a multiple of one row from
another
Notation
Some notations for elementary row operations:
Multiplying, say, row 1 by a constant c will be denoted by
R1 → cR1
A swap of, say, row 1 and row 2 will be denoted by
R1 ↔ R2
Adding a multiple of c of, say, row 2 to row 1 will be denoted by
R1 → R1 + cR2
Gaussian Elimination Example
1 2 2 11
3 −3 4 2 Attempt to make the green elements 0, i.e. eliminate them
6 3 −4 7

1 2 2 11
R3 → R3 –2R2 gives 3 −3 4 2
0 9 −12 3

1 2 2 11
R2 → R2 –3R1 gives 0 −9 2 −31
0 9 −12 3
Gaussian Elimination Example
1 2 2 11 −9𝑥2 + 2𝑥3 = −31
0 −9 −2 −31
0 9 −12 3 −9𝑥2 + 2(2) = −31
1 2 2 11
R3 → R3 + R2 gives us 0 −9 2 −31 −9𝑥2 + 4 = −31
0 0 −14 28 𝑥2 = 3
Or
𝑥1 + 2𝑥2 + 2𝑥3 = 11
𝑥1 + 2𝑥2 + 2𝑥3 = 11
𝑥1 + 2(3) + 2(2) = 11
−9𝑥2 + 2𝑥3 = −31
𝑥1 + 6 + 4 = 11
−14𝑥3 = −28
𝑥1 = 1
Now Solve using back substitution
−14𝑥3 = −28
𝑥3 = 2
Gaussian Elimination
Reduce the augmented matrix so that the coefficient matrix is in upper-triangular form
and then back-substitute.
Always work from the bottom left up the first column to get 0s, then the second
column and so on.
Conclusions
Simple systems of linear equations can be solved easily by hand
Typical direct methods for solving these equations include direct inversion and gaussian
elimination
We however routinely need to solve very large systems of equations
How do we solve those?

Answer: Iterative methods! The second lecture this week will be on these.

You might also like