How the original data can be written in the space defined by these M principal components?
Assuming your basis vectors are sorted by decreasing eigenvalues, a sample $x_i$ can be transformed into the new space using dot products (projections), i.e. $[u_1^Tx_i,...,u_M^Tx_i]$. Note that, you first de-mean your data.