**Underdetermined Systems**

You have seen how to use the matrix inverse method x = A -1b to solve the equation set Ax = b. However, this method works only if the matrix A is square; that is, if the number of unknowns equals the number of equations. Even if A is square, the method will not work if IAI = 0 because the matrix inverse A-I does not exist. The same limitation applies to Cramer’s method; it cannot solve equation sets where the number of unknowns does not equal the number of equations. This section explains how to use MATLAB to solve problems in which the

matrix A is square but IAI = 0, and problems in which A is not square. The left-division method works for square and non square A matrices. However, as you will see, if A is not square, the left-division method can give answers that might be misinterpreted. We explain how to interpret MATLAB results correctly. An underdetermined system does not contain enough information to solve for all of the unknown variables, usually because it has fewer equations than unknowns. Thus an infinite number of solutions can exist, with one or more

of the unknowns dependent on the remaining unknowns. For such systems the matrix inverse method and Cramer’s method will not work. When there 1Te more equations than unknowns, the left-division method will give a solution with some of the unknowns set equal to zero. A simple example is given by the equation x +3y = 6. All we can do is solve for one of the unknowns in terms of the other; for example, x = 6 – 3y. An infinite number of solutions satisfy this equation. The left-division method gives one of these solutions, the one with x set equal to

zero: x = 0, y = 2.

»A = [1,3];

»b = 6

»x = A\b

x = 0

2

An infinite number of solutions might exist even when the number of equations equals the number of unknowns. This situation can occur when IAI =O.For such systems the matrix inverse method and Cramer’s method will not work, and the left-division method generates an error message warning us that the matrix A is singular. In such cases the pseudoinverse method x = pinv (A) *b gives one solution, the minimum norm solution. In cases that have an infinite number of solutions, some of the unknowns can be expressed in terms of the remaining

unknowns, whose values are arbitrary. We can use the rref command to find these relations. We introduce these commands in this section and give examples showing how to interpret their results. An equation set can be under-determined even though it has as many equations as unknowns. For example, the set

2x -4y +5z =-4

-4x – 2y +3z = 4

2x +6y – 8z = 0

has three unknowns and three equations, but it is under-determined and has. infinitely many solutions. This condition occurs because the set has only two independent equations; the third equation can be obtained from the first two. To obtain the third equation, add the first and second equations to obtain – 2x – 6y +8z =0,

which is equivalent to the third equation.

Determining whether all the equations are independent might not be easy, especially if the’ set has many equations. For this reason we now introduce a method that enables us to determine easily whether or not an equation set has a solution and whether or not it is unique. The method requires an understanding of the concept of the rank of a matrix.

**Matrix Rank**

Consider the following 3 x 3 determinant:

If we eliminate one row and one column in the determinant we are left with a 2 x 2 determinant. Depending on which row and column we eliminate, we can obtain any of nine possible 2 x 2 determinants. These elements are called sub-determinants. For example, if we eliminate row 1 and column 1, we obtain

Sub-determinants can be used to define the rank of a matrix, which provides useful information concerning the existence and nature of solutions. The definition of matrix rank is as follows:

Matrix rank. An m x n matrix A has a rank r ≥ 1 if and only if IAI contains nonzero r x r determinant and every square sub-determinant with r + 1 or more rows is zero,

is 2 because IAI = 0 whereas A contains at least one nonzero 2 x 2. sub-determinant, For example, the sub-determinant obtained by eliminating row 1 and column 1 i nonzero and has the value 44. .

MATLAB provides an easy way to determine the rank of a matrix: First define the matrix A as an array in the usual way. Then type rank (A).For example, the following MATLAB session determines the rank of the matrix given by (6.4-1). j’ ,

»A = [3,-4,1;6,10,2;9,-7,3];

»rank(A)

ans= 2

**Existence and Uniqueness of Solutions **

The following test determines whether a solution exists and whether or not is unique. The test requires that we first form the so-called augmented matrix [A b]. The first n columns of the augmented matrix are the columns of A

**Existence and uniqueness of solutions.** The set Ax = b with m equations and It unknowns has solutions if and only if rank [A] = rank[A b] (I). Let r = rank[A]. If condition (I) is satisfied and if r = n, then the solution is unique. If condition (I) is satisfied but r < n, It, an infinite number of solutions exists and r unknown variables can be expressed as linear combinations of the other n – r unknown variables, whose values are arbitrary.

** Homogeneous case**. The homogeneous set Ax = 0 is a special case in which b = O. For this case rank[A] =rank [A b) always, and thus the set always has the trivial solution x = O.A nonzero solution, in which at least one unknown is nonzero, exists if and only if rank [A] < n. If m < n, the homogeneous set always has a nonzero solution.

Recall that if IAI = 0, the equation set is singular. If you try to solve a singular set using MATLAB, it prints a message warning that the matrix is singular and does not try to solve the problem. An ill-conditioned set of equations is a set that is close to being singular. The ill-conditioned status depends on the accuracy with which the solution calculations are made. When the internal numerical accuracy “‘ used by MATLAB is insufficient to obtain a solution, MATLAB prints a message to warn you that the matrix is close to singular and that the results might be

inaccurate.

**Test Your Understanding**

T6.4-1 Use MATLAB to show that the following set has a unique solution and

then find the solution:

3x + 12y – 7z = 5

5x – 6y – 5z = -8

-2x + 7y +9z.= 5

(Answer: The unique solution isx = -1.0204, Y = 0.5940,z = -0.1332.)

**The Pinv Command And The Euclidean Norn**

The pinv command can obtain a solution of an under-determined set. To solve the equation set Ax = b using the pinv command, type x = pinv (A) *b. – under-determined sets have an infinite number of solutions, and the pinv command produces a solution that gives the minimum value of the Euclidean norm, which is the magnitude of the solution vector x. The magnitude of a vector v in -dimensional space, having components x, y, z, is x2 +y2 + Z2.It can be cumputed using matrix multiplication and the transpose as follows:

We must decide whether or not the solutions given by the left-division and t0he pseudoinverse methods are useful for applications that have an infinite number of solutions, and we must do so in the context of the specific application. For example, in the light-fixture application discussed in Example 6.4-3, only two supports are required, and the left-division solution (the solution with T2 = 0) shows that if the middle support is eliminated, the forces in the end supports will be TI = 160 and T3 = 240 lb. Suppose we want to use three supports to reduce

the load carried by each support. The pseudoinverse solution (TI = 93, T2 = 133, T3 = 173) is the solution that minimizes the sum of the squares of the support forces.

Many problems are statically indeterminate because the engineer has included more supports than necessary, usually for safety in case one support fails. In practice,when engineers are confronted with a statically indeterminate problem, they supplement the equations of statics with equations that describe the deformations of the supports as functions of the applied forces and moments. These additional equations allow the forces and moments within the structure to be determined unambiguously.

**Test Your Understanding**

**T6.4-2** Use MATLAB to find two solutions to the following set:

x +3y +2z = 2

x+y+z=4

(Answer: Minimum norm solution: x = 4.33, y = -1.67, z = 1.34.

Left-division solution: x = 5, y = = l. z = 0.)

**The Reduced Row Echelon Form**

We can express some of the unknowns in an under-deternined set as functions of the remaining unknowns. For example, in the statically indeterminate case of Example 6.4-3, we wrote the solutions for two of the forces in terms of the third:

Note that the first two columns form a 2 x 2 identity matrix. Therefore, the corresponding equations can be solved directly for Ti and T2 in terms of T3. We can always reduce an under-determined set to such a form by multiplying

the set’s equations by suitable factors and adding the resulting equations to eliminate an unknown variable. The MATLAB rref command provides a procedure to reduce an equation set to this form, which is called the reduced row echelon form. Its syntax is rref ( [A b] ). Its output is the augmented matrix [C d) that corresponds to the equation set Cx = d. This set is in reduced row echelon form.

**Supplementing Underdeternined Systems**

Often the linear equations describing the application are under-determined because not enough information has been specified to determine unique values of the unknowns. In such cases we might be able to include additional information, objectives, or constraints to find a unique solution. We can use the rref command to reduce the number of unknown variables in the problem, as illustrated in the next two examples

**Test Your Understanding**

**T6.4-3 ** Use the rref and pinv commands and the left-division method to solve

the following set:

3x + 5y + 6z = 6

8x – y + 2z = 1

5x – 6y – 4z = -5

(Answer: The set has an infinite number of solutions. The result obtained with the rref command is x = 0.2558 -0.372lz, = 1.0465 -0.9767z, z arbitrary. The pinv command gives x = 0.0571, y = 0.5249, z = 0.5340. The left-division method generates an error message.)

**16.4-4** Use the rref and pinv commands and the left-division method to solve the following set:

3x + 5y + 6z =4

x – 2y – 3z = IO

(Answer: The set has an infinite number of solutions. The result obtained with the rref command is x = 0.2727z + 5.2727, y = -1.3636z – 2.3636. z arbitrary. The solution obtained with left division is x =4.8000,

y = 0, z = -1.7333. The pseudoinverse method gives x = 4.8394,

y = -0.1972, z = -1.5887.)