According to Wikipedia,
the Gram–Schmidt process is a method for orthonormalising a set of vectors in an inner product space,Gram–Schmidt process, Wikipedia
We had to automate the process by writing a Python application. I”m not sure what I like best, learning about it, or coding about it. Me thinks I’ll take the latter.
Here’s a snippet:
def gsBasis(A) : B = np.array(A, dtype=np.float_) for i in range(B.shape) : for j in range(i) : B[:, i] = B[:,i] - B[:,i] @ B[:,j] * B[:,j] if la.norm(B[:, i]) > verySmallNumber : B[:, i] = B[:, i] / la.norm(B[:, i]) else : B[:, i] = np.zeros_like(B[:, i]) return B
You can view the full code on Github.