Sale!

# code called pivot

\$30.00

Category:

## Description

5/5 - (2 votes)

Problem 1: Write a code called pivot.above(A,row,col) which
does the pivoting procedure but rather it fills 0 above the 1.
Problem 2: Sometimes a different type of row reduction is more
useful. Usually our pivots are all equal to 1. It is possible to row
reduce the matrix by leaving the pivots alone. Here is a worked
out example with a 3 × 3 matrix that illustrates the procedure.
Suppose we wish to row reduce the following matrix,

2 3 4
5 6 7
8 9 1

Usually we begin by replacing R1 7→ 1
2R1 so that the pivot in the
upper-left corner, i.e. 2, turns into 1. But we can leave the pivot
alone and proceed to pivot below that 2 and turn the 5 and 8 into
0’s. In this case we do the row operations,
−(
5
2
)R1 + R2 7→ R2 and − 4R1 + R3 7→ R3
The resulting matrix becomes,

2 3 4
0 −
3
2 −3
0 −3 −15

So on and so forth until the matrix is row reduced.
Write a code in R for a function called row.reduce.no.division(A)
by modifying the code for pivot.below(A,r,c). There will only
be a few changes. It is okay in this exercise to only do half the
row-reduction and leaving it as an upper triangular matrix.
1