Algorithms, Linear Equation.
matrix a[i,k+1:n] = a[i,k+1:n] - lam*a[k,k+1:n] #we update vector b b[i] = b[i] - lam*b[k] # backward substitution for k in range(n-1,-1,-1): b[k] = (b[k] - np.dot(a[k,k+1:n],b[k+1:n]))/a[k,k] return b #initial coefficients a=np.array([[1.0,1.0,1.0],[1.0,-1.0,-1.0],[1.0,-2.0,3.0]])