vector: A NumPy array representing the vector. basis: A list of NumPy arrays representing the orthonormal basis. Returns: The projection of the vector. # Calculate the projection matrix.