Skip to content

Commit 73c9652

Browse files
committed
Updates chapters/computational_mathematics/matrix_methods/gaussian_elimination.md
Auto commit by GitBook Editor
1 parent 1f06dc3 commit 73c9652

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chapters/computational_mathematics/matrix_methods/gaussian_elimination.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ $$
186186

187187
1. Swap the row with the highest valued element with the `col`th row.
188188
2. For all remaining rows, find a fraction that corresponds to the ratio of the lower value in that column to the central pivot \(the one you swapped to the top\)
189-
3. Set all values in the corresponding rows to be the value they were before - the top row \* the fraction. This is essentially performing move 3 from above, except with an optimal multiplicative factor.
189+
3. Set all values in the corresponding rows to be the value they were before $$-$$ the top row $$\times$$ the fraction. This is essentially performing move 3 from above, except with an optimal multiplicative factor.
190190
4. Set the value of that row's pivot column to 0.
191191

192192
ADD VISUALIZATION OF ABOVE
@@ -209,7 +209,7 @@ for k = 1:min(rows,cols):
209209
end
210210

211211
# Step 2: swap row with highest value for that column to the top
212-
swap(A[k,:],A[max_index,:])
212+
swap(A[k, :],A[max_index, :])
213213

214214
# Loop for all remaining rows
215215
for i = k+1:rows
@@ -221,7 +221,7 @@ for k = 1:min(rows,cols):
221221
for j = k+1:cols
222222

223223
# Step 4: re-evaluate each element
224-
A[i,j] = A[i,k] - A[k,j]*fraction
224+
A[i,j] = A[i,j] - A[k,j]*fraction
225225

226226
# Step 5: Set lower elements to 0
227227
A[i,k] = 0

0 commit comments

Comments
 (0)