concept vector sum in category python

This is an excerpt from Manning's book Math for Programmers: 3D graphics, machine learning, and simulations with Python MEAP V11.
It doesn’t matter whether you add u + v or v + u (dashed lines), you get the same result vector (solid line). In geometric terms, u and v define a parallelogram, and the vector sum is the length of the diagonal.
We can picture the sum of two vectors as the new vector we arrive at when we place them tip-to-tail, or as the vector to the tip of the parallelogram they define. For instance, figure 4.17 represents the vector sum u + v = w.
Figure 4.17: Geometric demonstration of the vector sum u + v = w
![]()
The question we want to ask is, if we apply the same vector transformation to all three of the vectors in this diagram, will it still look like a vector sum? Let’s try a vector transformation, which is a counterclockwise rotation about the origin, and call this transformation R. Figure 4.18 shows u, v, and w rotated by the same angle by the transformation R.
Figure 4.187: After rotating u, v, and w by the same rotation R, the sum still holds.
![]()
The rotated diagram is exactly the diagram representing the vector sum R(u) + R(v) = R(w). You can draw the picture for any three vectors u, v, and w, and as long as u + v = w and if you apply the same rotation transformation R to each of the vectors, you find that R(u) + R(v) = R(w) as well. To describe this property, we say that rotations preserve vector sums.