Professional Documents
Culture Documents
• Addition, multiplication of
{scalar,vector,matrix}×{scalar,vector,matrix}
• Examples:
2
System of linear equations
• A simple example: x − 2 x = −1
⇒ x1 = 3, x2 = 2
1 2
− x1 + 3 x2 =
3
3
• Example of three equations, three unknown x1 − 2 x2 + x3 =0 (1)
systems: 2 x2 − 8 x3 =
8 (2)
−4 x + 5 x + 9 x = −9
• Each equation is a plane 1 2 3
(3)
• The solution is the intersection of three
planes
• But how to solve it? Elimination procedure 4 x1 − 8 x2 + 4 x3 =
0
– Step 1: 4´(1)+(3), we obtain eq. (4) −4 x1 + 5 x2 + 9 x3 =
−9
− 3 x2 + 13 x3 =
−9 (4)
3 x2 − 12 x3 =
12
– Step 2: 1.5´(2)+(4), we obtain −3 x + 13 x =−9
2 3
x3 = 3
4
• The above example shows the system of linear equations has one
solution
• But as in two equations, two unknowns case, there can be no
solution or multiple solutions
• Example: Determine the solution of
=
2 x1 − 3 x2 + 2 x3 1 (1) = 2 x1 − 3 x2 + 2 x3 1 (1)
−5/ 2×(1) + (3)
=x2 − 4 x3 8 (2) → =x2 − 4 x3 8 (2)
5x − 8x + 7 x = −(1/ 2) x + 2 x = −3 / 2
1 2 3 1 (3) 2 3 (4)
2 x1 − 3 x2 + 2 x3 =1 (1)
1/ 2×(2) + (4)
→ x2 − 4 x3 =8 (2)
0 x + 0 x + 0 x =
1 2 3 5/ 2 (5)
– There is no value of x1, x2 and x3 that will satisfy the last equation ⇒ no
solution
• Remark:
– A system of linear equations is said to be inconsistent if it has no
solution
– Conversely, a system of equations is called consistent if there is at
least one solution
5
• General system of linear equations:
a11 x1 + a12 x2 + + a1n xn = b1
a x + a x + + a x =
21 1 22 2 b2
2n n
am1 x1 + am 2 x2 + + amn xn = bm
7
• Another more commonly used shorthand notation when applying
Gaussian elimination is to write the system of equations in an
augmented matrix form
• For the previous example, therefore, we can also write
1 -2 1 0 1 -2 1 0 1 -2 1 0
0 2 -8 8
→ 0 2 -8 8
→ 0 2 -8 8
-4 5 9 −9 0 -3 13 −9 0 0 1 3
• Concept of pivot goes here!
• The “triangular” form is more apparent in this notation. In addition to
“triangular” form, sometimes, we will get a “step-like” pattern that
moves down and to the right, e.g.,
– The fourth equation will be satisfied by any choice of x1, x2, x3, x4
– From the third equation, we have x4=0
– Putting x4=0 into the second equation, we obtain x2 = -3-2x3
– Then putting x4=0 and x2 = -3-2x3 into the first equation, we can obtain
x1 = 5+3x3
– We can see that there is no constraint on x3, therefore x3 can be treated
as a free variable
– We have more than one solution and the solution can be written as
x1= 5 + 3 x3
x2 =−3 − 2 x3
x3 is free
x4 = 0
14
• Example: Traffic flow
– Suppose the vehicles per hour over several
streets are given on the right
– We want to determine the unknowns x1, x2, x3, x4
– We make use of the fact that at each intersection,
the traffic flow in must be equal to the flow out
– At intersection A, we have 300+500 = x1+ x2
– At intersection B, we have x2 + x4 = 300+ x3
– We can also set up equations for intersections C
and D
– Finally, we also have total traffic into the network
must equal total traffic out of the network:
(500+300+100+400)=(300+600+x3)
– Putting all the equations together, we have
x1 + x2 =
800 = x1 600 − x5
By Gaussian elimination,
x2 − x3 + x4 =
300 the solution is = x2 200 + x5
x4 + x5 =
500 x3 = 400
x + x5 =
600 = x 500 − x5
1 4
x3 = 400 x5 is free
15