The vector projection of a vector a on (or onto) a nonzero vector b (also known as the vector component or vector resolution of a in the direction of b) is the orthogonal projection of a onto a straight line parallel to b. It is a vector parallel to b, defined as
where is a scalar, called the scalar projection of a onto b, and b̂ is the unit vector in the direction of b. In turn, the scalar projection is defined as
where the operator · denotes a dot product, |a| is the length of a, and θ is the angle between a and b. The scalar projection is equal to the length of the vector projection, with a minus sign if the direction of the projection is opposite to the direction of b.
The vector component or vector resolute of a perpendicular to b, sometimes also called the vector rejection of a from b, is the orthogonal projection of a onto the plane (or, in general, hyperplane) orthogonal to b. Both the projection a1 and rejection a2 of a vector a are vectors, and their sum is equal to a, which implies that the rejection is given by
Typically, a vector projection is denoted in a bold font (e.g. a1), and the corresponding scalar projection with normal font (e.g. a1). In some cases, especially in handwriting, the vector projection is also denoted using a diacritic above or below the letter (e.g., or a1; see Euclidean vector representations for more details).