With as in i, the foot of a perpendicular lies strictly between the endpoints precisely when . Since the denominator is positive, this givesEquivalently, both dot productsare positive: the angles of the triangle at and are both less than . If “between” includes the endpoints, replace both strict inequalities by non-strict ones; equality gives or .
Write . Since the triangle is nondegenerate, . Every point on the line has a unique position vector . The condition that is orthogonal to is the dot product equationIts coefficient of is , so it has exactly one solution. The foot of a perpendicular is thereforeThis is the orthogonal projection of onto the line , expressed using the Euclidean norm.