Function to determine the required number of dimension for generating the projection matrix
Useful links