A projection matrix is the matrix representation of a linear map which maps from a given space to it's projection in a given subspace, because of this a projection matrix must be a square matrix as it maps from as .
Given a subspace of a space we can define the transformation matrix projecting from to as:
Where is the matrix who's columns form the basis for , then for any vector in it's projection is .