The scalar product of vectors
The scalar product of →a(x₁; y₁) and →b(x₂; y₂) is the number x₁x₂ + y₁y₂: →a · →b = x₁x₂ + y₁y₂. The result is a number, not a vector. The scalar product of a vector with itself, →a · →a, is called the scalar square and written →a²; in coordinates →a² = x₁² + y₁². On the other hand →a² = |→a|², so |→a| = √(x₁² + y₁²). This formula for the length of a vector from its coordinates is really a consequence of the Pythagorean theorem: the coordinates are the legs of a right triangle. The distributive law over addition holds: (→a + →b) · →c = →a · →c + →b · →c.
On a game screen a character moves 7 units right and 24 units up from the bottom-left corner. The straight-line distance is √(7² + 24²) = √625 = 25 units. If the scalar product of two non-zero vectors is 0, they are perpendicular.
A game designer calculates distances between objects, a robotics technician checks that two directions are perpendicular, and a physicist finds the work done by a force with a scalar product.
Find the scalar product of (4; 1) and (−1; 4): 4 · (−1) + 1 · 4 = 0. Draw them on squared paper and check with a sheet corner that they meet at a right angle.
“Length of a vector”: on squared paper draw an arrow 3 squares right and 4 squares up, measure its length and check that it equals the 5 given by the formula.