When I multiply an eigenvector by a matrix, it should result in the same output as multiplying that eigenvector by its corresponding eigenvalue. I am trying to verify that my eigenvectors and eigenvalues are working as advertised, but the outputs don't seem right.
cov_matrix = np.cov(scaled_data)
eig_vals, eig_vecs = np.linalg.eigh(cov_matrix)
a = cov_matrix.dot(eig_vecs[:, 0])
b = eig_vecs[:, 0] * eig_vals[0]
When I print a and b, they are the same shape but their values are all different. What is going wrong here?