An Example of a Numerical-method Solution in

The Keys to Linear Algebra

As an example of reversing a vector in problem solving, recall, from Section 1.1.3, the vector a = (25, 32, 20, 22, 28) that represents the ages of five patients. Suppose you have a method for sorting the components of a vector in increasing order, but that you now want to sort the components in decreasing order. Rather than writing a new sorting procedure, you can can use the existing one by performing the following steps:

Step 1. Reverse the vector a to obtain -a = (-25, -32, -20, -22, -28).

Step 2. Sort the vector -a in increasing order: (-32, -28, -25, -22, -20).

Step 3. Reverse the vector in Step 2 to obtain (32, 28, 25, 22, 20),

which is the original vector sorted in decreasing order.

The three steps just described for sorting the components of a vector in decreasing order are an example of a numerical-method solution, which is a solution obtained from the problem data by performing a sequence of computations.