Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Cubic function wikipedia , lookup
Quartic function wikipedia , lookup
Quadratic equation wikipedia , lookup
Linear algebra wikipedia , lookup
Elementary algebra wikipedia , lookup
Signal-flow graph wikipedia , lookup
System of polynomial equations wikipedia , lookup
1. Systems of linear equations Many engineering problems result in a system of equations for unknown quantities x1 , x2 , x3 , x4 , say, where the variables xj (j = 1, 2, 3 or 4) represent quantities such as electrical currents, production totals, stresses, etc. Often these equations will be linear (meaning that no variable is raised to a power (other than one!) or is multiplied by any other variable). 1.1. A 1×1 system (i.e. 1 equation for 1 unknown). For example, suppose we are asked to solve: 2x = 6 clearly the solution is x = 3. In general if a and b are any two given real numbers, we might be asked to find the values of x for which ax = b (1.1) is satisfied. There are three cases: (1) If a 6= 0 then we can divide (1.1) by a, therefore we get x = b/a and this is the unique solution, i.e. the only value of x such that (1.1) is satisfied. (2) If a = 0 and b 6= 0, then condition (1.1) is impossible – there cannot exist any real values of x such that 0·x = b (6= 0). Hence there is no solution. (3) If a = 0 and b = 0, then any value of x will satisfy 0 · x = 0. Hence there are infinitely many solutions. We will return to this problem (1.1) time and again. 1.2. A 2 × 2 system (i.e. 2 equations for 2 unknowns). A simple example is the system of two equations 3x1 + 4x2 = 2 x1 + 2x2 = 0 (1.2) (1.3) for the unknowns x1 and x2 . There are many ways to solve this simple system of equations—we describe one that is easily generalised to much larger systems of linear equations. 1 2 Step 1 The first step is to eliminate x1 from (1.3) by replacing (1.3) by 3×(1.3)−(1.2): 3x1 + 4x2 = 2 2x2 = −2. (1.4) (1.5) Step 2 Equation (1.5) is easy to solve (divide both sides by 2), and gives x2 = −1. Step 3 Substitution of this result back into (1.4) then gives 3x1 − 4 = 2 ⇒ 3x1 = 6 ⇒ x1 = 2. The solution to equations (1.2) and (1.3) is therefore x1 = 2 x2 = −1. Check 3 × 2 + 4 × (−1) = 2 2 + 2 × (−1) = 0. Here’s another way to think about the steps we performed above: Step 1 What we did in step 1 above is exactly equivalent to the following sub-steps (which we omitted for brevity). First solve (1.2) for 3x1 , i.e. 3x1 = 2 − 4x2 . Now multiply (1.3) by 3 so that it becomes (exactly the same equation in a slightly different format): 3x1 + 6x2 = 0. Step 2 Now subsitute the expression for 3x1 in the first equation into the second (thus eliminating x1 ) to get (2 − 4x2 ) + 6x2 = 0 ⇒ 2x2 = −2. Step 3 Now the value x2 is obvious and we substitute its value back into the first equation to find x1 (this process is known as “back subsitution”). 3 There’s even another way to interpret this pair (1.2), (1.3) of simultaneous equations. Both (1.2), (1.3) represent straight lines in the (x1 , x2 )–plane, we can re-express them as: x2 = − 43 x1 + 23 , = − 21 x1 . x2 In posing the problem of finding the solution of this pair of simultaneous equations, we are asked to find the values of x1 and x2 such that both these constraints (each of these equations represents a constraint on the set of values of x1 and x2 in the plane) are satisfied simultaneously; this happens at the intersection of the two lines. In general, consider the system of two linear equations: a11 x1 + a12 x2 = b1 a21 x1 + a22 x2 = b2 . (1.6) (1.7) Solving these equations gives us (1.6) a11 x1 + a12 x2 = b1 (1.8) a11 × (1.7) − a21 × (1.6) (a11 a22 − a12 a21 )x2 = a11 b2 − a21 b1(1.9) If a11 a22 − a12 a21 6= 0 then we may solve (1.9) to give a11 b2 − a21 b1 . a11 a22 − a12 a21 Similarly, by considering a22 × (1.6) − a12 × (1.7) we find x2 = x1 = a22 b1 − a12 b2 . a11 a22 − a12 a21 If a11 a22 − a12 a21 = 0 then (1.9) may or may not have a solution: (i) if the right-hand side is non-zero, i.e., a11 b2 − a21 b1 6= 0 then there are no solutions of (1.6), (1.7); (ii) if a11 b2 − a21 b1 = 0 then any value of x2 will satisfy (1.9). Important. The quantity D = a11 a22 − a12 a21 is clearly important, and is called the determinant of the system (1.6), (1.7). It is denoted by a11 a12 or det a11 a12 . a21 a22 a21 a22 4 1.3. A 3 × 3 system. A similar procedure can also be used to solve a system of three linear equations for three unkowns x1 , x2 , x3 . For example, suppose we wish to solve 2x1 + 3x2 − x3 = 5 4x1 + 4x2 − 3x3 = 3 2x1 − 3x2 + x3 = −1 (1.10) (1.11) (1.12) to obtain x1 , x2 , x3 . First we eliminate x1 from equations (1.11) and (1.12) by subtracting multiples of (1.10). We replace (1.11) by (1.11)−2×(1.10) and (1.12) by (1.12)−(1.10), to leave the system 2x1 + 3x2 − x3 = 5 −2x2 − x3 = −7 −6x2 + 2x3 = −6. (1.13) (1.14) (1.15) (Effectively, what we have done in this step is solve (1.10) for 2x1 , multipled the result by 2, and substitute the resulting expression for 4x1 into (1.11), thus eliminating x1 from that equation, and then also we have subsituted our expression for 2x1 from the first equation into (1.12) to eliminate x1 from that equation also.) Next we eliminate x2 from (1.15). We do this by subtracting an appropriate muliple of (1.14). (If we subtract a multiple of (1.13) from (1.15) instead, then in the process of eliminating x2 from (1.15) we re-introduce x1 !) We therefore replace (1.15) by (1.15)−3×(1.14) to leave 2x1 + 3x2 − x3 = 5 −2x2 − x3 = −7 5x3 = 15. Now we find the solution by first solving (1.18) to give 15 = 3. 5 Then substitute this result back into (1.17) to give x3 = −2x2 − 3 = −7 ⇒ 2x2 = 4 ⇒ x2 = 2. (1.16) (1.17) (1.18) 5 Finally we substitute the values of x2 and x3 back into (1.16) to give 2x1 + 6 − 3 = 5 ⇒ 2x1 = 2 ⇒ x1 = 1. So the solution to the system (1.10), (1.11), (1.12), is x1 = 1 x2 = 2 x3 = 3. Important. This method is known as Gaussian Elimination, and can be applied to any size of system of equations. Remark. Let’s consider a more geometric interpretation for what it means to find the solution of (1.10)–(1.12). An equation of the form z = mx + ny + c where m, n and c are given constants, actually represents an infinite plane in three dimemsional space (note the analogy with the line y = mx + c in the (x, y)-plane). Thus (1.10), (1.11) and (1.12) actually represent three different planes (in three-dimensional space) and we are asked to find the values of (x1 , x2 , x3 ) such that each of the three equations is satisfied simultaneously – i.e. the point(s) of intersection of the three planes. If no two of the three planes are parallel, then since two planes intersect in a line, and the third plane must cut that line at a single/unique point, we therefore the a unique solution in this case (where all three planes meet) which (we deduce algebraically as above) to be x1 = 1, x2 = 2 and x3 = 3. Important. Note how in all the last examples, the number of equations equalled the number of unknowns. Such systems of simultaneous equations are said to be determined. If the number of equations is less that the number of unknowns, the system is said to be under-determined and a unique solution cannot be found – for example when we have two equations for three unknowns, the solution is the intersection of two planes which is a line and there are an infinity of solutions (rather than a single/unique one). If the number of equations is larger than the number of unknowns, then the system is said to be over-determined – we have too many constraints and we cannot find a set of unknowns satisfying all the constraints (there is no solution whatsoever). As we shall see, to distinguish if a system is exactly/under/over-determined is not a trivial matter. References [1] Cox, S.M. 1997 Lecture notes on linear algebra, University of Nottingham.