<jupyter_start><jupyter_text>Performing Gauss-Jordan Elimination On The Matrix Below : ![2021-04-17%20%282%29.png](attachment:2021-04-17%20%282%29.png) Where The (3 X 2)Matrix Horizontally Stacks Itself With A (3 X 1)Vector. Create The Matrix<jupyter_code>import numpy as np
A = np.array([[1,3,14],[7,-1,10],[2,7,9]])
print(A)<jupyter_output>[[ 1  3 14]
 [ 7 -1 10]
 [ 2  7  9]]<jupyter_text>Subtract Row 1 Multiplied By 7 From Row 2.*R2 = R2 - 7R1*<jupyter_code>for itr in range(len(A)):
    A[1][itr] -= (7 * A[0][itr])
    
print(A)<jupyter_output>[[  1   3  14]
 [  0 -22 -88]
 [  2   7   9]]<jupyter_text>Subtract Row 1 Multiplied By 2 From Row 3.*R3 = R3 - 2R1*<jupyter_code>for itr in range(len(A)):
    A[2][itr] -= (2 * A[0][itr])

print(A)<jupyter_output>[[  1   3  14]
 [  0 -22 -88]
 [  0   1 -19]]<jupyter_text>Divide Row 2 By -22.*R2 = -R2 // 22*<jupyter_code>for itr in range(len(A)):
    A[1][itr] *= -1
    A[1][itr] //= 22

print(A)<jupyter_output>[[  1   3  14]
 [  0   1   4]
 [  0   1 -19]]<jupyter_text>Subtract Row 2 Multiplied By 3 From Row 1.*R1 = R1 -3R2*<jupyter_code>for itr in range(len(A)):
    A[0][itr] -= (3 * A[1][itr])

print(A)<jupyter_output>[[  1   0   2]
 [  0   1   4]
 [  0   1 -19]]<jupyter_text>Subtract Row 2 From Row 3.*R3 = R3 - R2*<jupyter_code>for itr in range(len(A)):
    A[2][itr] -= A[1][itr]

print(A)<jupyter_output>[[  1   0   2]
 [  0   1   4]
 [  0   0 -23]]<jupyter_text>Obtained Reduced Matrix :<jupyter_code>print(A)<jupyter_output>[[  1   0   2]
 [  0   1   4]
 [  0   0 -23]]<jupyter_text>Obtained Solutions :<jupyter_code>print("X_1 = ")
print(A[0][2])
print("X_2 = ")
print(A[1][2])
print("X_3 = ")
print(A[2][2])<jupyter_output>X_3 = 
-23
StarcoderdataJupyterStructuredCleanDedup