List down the steps of a PCA algorithm

The major steps which are to be followed while using the PCA algorithm are as follows:

Step-1: Get the dataset.

Step-2: Compute the mean vector (µ).

Step-3: Subtract the means from the given data.

Step-4: Compute the covariance matrix.

Step-5: Determine the eigenvectors and eigenvalues of the covariance matrix.

Step-6: Choosing Principal Components and forming a feature vector.

Step-7: Deriving the new data set by taking the projection on the weight vector.