the scalar projection becomes: In two dimensions, this becomes Vector projection Similarly, the definition of the vector projection of onto becomes: which is equivalent to either or Scalar rejection In two dimensions, the scalar rejection is equivalent to the projection of onto , which is rotated 90° to the left. Hence, Such a dot product is called the "perp dot product." Vector rejection By definition, Hence, Properties Scalar projection The scalar projection on is a scalar which has a negative sign if 90 degrees < θ ≤ 180 degrees. It coincides with the length of the vector projection if the angle is smaller than 90°. More exactly: if , if . Vector projection The vector projection of on is a vector which is either null or parallel to . More exactly: if , and have the same direction if , and have opposite directions if . Vector rejection The vector rejection of on is a vector which is either null or orthogonal to . More exactly: if or , is orthogonal to if , Matrix representation The orthogonal projection can be represented by a projection matrix. To project a vector onto the unit vector , it would need to be multiplied with this projection matrix: Uses The vector projection is an important operation in the Gram–Schmidt orthonormalization of vector space bases. It is also used in the separating axis theorem to detect whether two convex shapes intersect. Generalizations Since the notions of vector length and angle between vectors can be generalized to any n-dimensional inner product space, this is also true for the notions of orthogonal projection of a vector, projection of a vector onto another, and rejection of a vector from another. In some cases, the inner product coincides with the dot product. Whenever they don't coincide, the inner product is used instead of the dot product in the formal definitions of projection and rejection. For a three-dimensional inner product space, the notions of projection of a vector onto another and rejection of a vector from another can be generalized to the notions of projection of a vector onto a plane, and rejection of a vector from a plane. The projection of a vector on a plane is its orthogonal projection on that plane. The rejection of a vector from a plane is its orthogonal projection on a straight line which is orthogonal to that plane. Both are vectors.