Consider the vector is .
The component in direction is same as the component in
direction.
Substitute .
.
The magnitude of the vector is .
The magnitude of the vector is
.
Substitute and
.
.
.
Substitute in
.
.
Susbtitute and
in
.
.
or
.
The vector is or
.