Elementary Solution Methods

You are sure to encounter situations in which MATLAB is not available (such as on a testl), and thus you should become familiar with the hand-solution methods. In addition, understanding these methods will help you understand the MATLAB responses and the pitfalls that can occur when obtaining a computer solution. Finally, hand solutions are sometimes needed when the numerical valuesof one or more coefficients are unspecified. In this section we cover hand-solution methods; later in the chapter we introduce the MATLAB methods for solving linear equations. Several methods are available for solving linear algebraic equations by hand. The appropriate choice depends on user preference, on the number of equations, and on the structure of the equations to be solved. We demonstrate two methods: (I) successive elimination of variables and (2) Cramer’s method (in Section 6.3). The MATLAB method is based on the successive elimination technique, but Cramer’s method gives us some insight into the existence and uniqueness of solutions and into the effects of numerical inaccuracy.

Successive Elimination of Variables

An efficient way to eliminate variables is to multiply one equation by a suitable factor and then add or subtract the resulting equation from another equation in the set. If the factor is chosen properly, the new equation so obtained will contain fewer variables, This process is continued with the remaining equations until only one unknown and one equation remain. A systematic method of doing this is Gauss elimination. With this method you multiply the first equation (called the pivot equation) by a suitable factor and add the result to one of the other equations in the set to cancel one variable. Repeat the process with the other equations in the set, using the same pivot equation. This step generates a new set of equations, with one less variable. Select the new pivot to be the first equation in this new set and repeat the process until only one variable and one equation remain. This method is suitable for computer implementation, and it forms the basis for many computer methods for solving linear equations. (It is the method used by MATLAB.)

T6.1-1 Solve the folJowing equations using Gauss elimination:
6x – 3y + 4z = 41
12x + 5y – Tz = -26
-5x + 2y +6z = 14
(Answer: x = 2, y = -3, z = 5.)

Singular and Ill-Conditioned Problems
.Figure 6.1-1 shows the graphs of the folJowing equations:
3x – 4y = 5
6x – JOy = 2
Note that the two lines intersect, and therefore the equations have. a solution, which is given by the intersection point: x = 7, y = 4. A singular problem refers to a set of equations having either no unique solution or no solution at all. For
example, the set
3x – 4y = 5
6x – 8y = JO
is singular and has no unique solution because the second equation is identical to the first equation, multiplied by 2. The graphs of these two equations are identical. AlJ we can say is that the solution must satisfy y = (3x – 5)/4, which describes an infinite number of solutions . .On the other hand, the set
3x – 4y = 5
6x – 8y = 3
(6.l-ti)
(6.1-7)
is singular but has no solution. The graphs of these two equations are distinct but parallel (see Figure 6.1-2). Because they do not intersect, no solution exists.  Homogeneous Equations
As another example, consider the following set of homogeneous equations (which means that their right sides are all zero)
6x +ay = 0
2x +4y = 0
(6.1-8)
(6.1-9)
where a is a parameter. Multiply the second equation by 3 and subtract the result from the first equation to obtain
(a-12)y=0′ (6.1-10)
The solution is y = 0 only ifa =/: 12; substituting y = 0 into either (6.1-8) or (6.1-9) shows that x = O. However, if a = 12, (6.1-10) implies that Oy = 0,  which is satisfied for any finite value of y; in this case both (6.1-8) and (6.1-9)
give x = -2y. Thus if a = 12, there are an infinite number of solutions for x andy, where x = -2y.
Ill-Conditioned Equations
An ill-conditioned set of equations is a set that is close to being singular (for example, two equations whose graphs are close to being parallel). The following set would be considered an ill-conditioned set if we carry only two significant figures in our calculations:
3x – 4y = 5
6x – 8.002y= 3
To see why, solve the first equation for y to obtain
3x -5
y=–
4
and solve the second equation to obtain
6x – 3 3x – 1.5
y = — = (6.1-12)
8.002 4.001

The slope of (6.1-11) is 3/4, whereas the slope of (6.1-12) is 3/4.001. If we had carried only two significant figures, we would have rounded the denominator of the latter expression to 4.0, and thus the two expressions for y would have the same slope and their graphs would be parallel. Thus we see that the ill-conditioned status depends on the accuracy with which the solution calculations are made. Of course, MATLAB uses more than two significant figures in its calculations. However, no computer can represent a number with infinitely many significant
figures, and so a given set of equations can appear to be singular if the accuracy required to solve them is greater than the number of significant figures used by the software. If we carry four significant figures in our calculations, we would find that the solution is x =4668 and y = 3500.

T6.1-2 Show that the following set has no solution.
-4x + 5y = 10
12x – 15y = 8
T6.1-3 For what value of b will the following set have a solution in which both
x and yare nonzero? Find the relation between x and y.
2xI +9X2 = 5
3xI – 4X2 = 7
This set can be expressed in vector-matrix form as
(6.2-1)
(6.2-2)
4x – by =0
-3x +6y = 0
(Answer: If b = 8, x = 2y. If b =j:. 8, x = y = 0.)