You start by calculating the norm of the vector
$$||V|| = \sqrt{\langle V , V \rangle} = \sqrt{-6 \cdot (-6) + (-8i) \cdot 8i} = \sqrt{6^2 + 8^2} = 10$$
Then the normalized vector can be obtained by dividing each element of the original vector by its norm:
$$\frac{V}{||V||} = \begin{bmatrix} -0.6 \\ 0.8i \end{bmatrix}$$
@[solution]({"id": "linear_algebra__normalized_vector_solution", "codePath": "Solution.qs"})microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
katas/content/linear_algebra/normalized_vector/solution.md
9lines · modepreview