Vector A² = dot product of A with A = | A |²
| A | is the magnitude of vector A.
|R|² = |A|² + | B |² + 2 | A | * | B | * Cos θ
where θ = angle between A and B.
As |R|² = |A|² + |B|², Cos θ = 0 => θ = π/2
So the two vectors are perpendicular to each other.