# Finding vectors using solver

I have an question using vector:

u = {u1, u2}; v = {v1, v2};


$|u|=4$ and $|v|=2$ and $u.v=3$

Find: $(3u-2v).(-u+4v)$

I tried to use some solver, but nothing worked.

Solve[Norm[u] == 4 && Norm[v] == 2 && u.v == 3, {u, v}]


What procedure to follow?

• The first question that occurs to me is, what dimension are the vectors? That information probably has to be encoded in order to get an answer. One way would be to give u and v explicit components. Apr 15, 2018 at 18:59
• (1) You've got three equations and one unknown in the new example problem. (2) Since for all α, the norm of u is greater than 4, there is no solution. (Similar problem with v.) Apr 15, 2018 at 19:06
• Doesn't this problem have more solutions than the answers below would suggest? Solve[Norm[u] == 4 && Norm[v] == 2 && u.v == 3, {u \[Element] FullRegion@2, v \[Element] FullRegion@2}, Reals] gives more results... Apr 16, 2018 at 4:45

For dimension is two.

u = {u1, u2}; v = {v1, v2};

Solve[Norm[u] == 4 && Norm[v] == 2 && u.v == 3, {u1, u2, v1,
v2}, Reals]

(*   {{u1 -> -(Sqrt[55]/2), u2 -> -(3/2), v1 -> 0,
v2 -> -2}, {u1 -> -(Sqrt[55]/2), u2 -> 3/2, v1 -> 0,
v2 -> 2}, {u1 -> Sqrt[55]/2, u2 -> -(3/2), v1 -> 0,
v2 -> -2}, {u1 -> Sqrt[55]/2, u2 -> 3/2, v1 -> 0, v2 -> 2}}   *)

• Ha-ha! You beat me by 4 seconds. :) (+1) Apr 15, 2018 at 19:04
• The well known story of the early bird. (+1) Apr 15, 2018 at 19:08

If the dimension of the vector is 2:

Thread[List[u, v] -> #] & /@
Block[{u = Array[a, 2], v = Array[b, 2]},
{u, v} /.
Solve[Norm[u] == 4 && Norm[v] == 2 && u.v == 3, Flatten@{u, v}]
]
(*
{{u -> {-4, 0}, v -> {-(3/4), -(Sqrt[55]/4)}},
{u -> {4, 0}, v -> {3/4, -(Sqrt[55]/4)}},
{u -> {-4, 0}, v -> {-(3/4), Sqrt[55]/4}},
{u -> {4, 0}, v -> {3/4, Sqrt[55]/4}}}
*)