Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a few vectors defined as

V1 = Array[v1,3]
V2 = Array[v2,3]
V3 = Array[v3,3]

And I am trying to solve a very simple equation along the lines of

Norm[V1 + a V2 + (b^2)V3] == c

Mathematica succeeds without difficulty, but the result is quite dissatisfying. There are a lot of parts,such as dot products and norms, that could be expressed very concisely in linear algebra notation and are instead reported in element-wise form. I have tried a pass of Simplify, but that took long and did not help. Given that I am sticking to the nice world of finite dimensional, real-valued vectors (in fact I am using $Assumptions = {_ [Element] Reals}), is there any way in which I could get rid of clutter such as

V3[1] V2[1] + V3[2] V2[2] + V3[3] V2[3]

in favor of cleaner options such as V3.V2?

share|improve this question

marked as duplicate by Jens, Simon Woods, Michael E2, Kuba, rm -rf May 25 at 22:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
If you are solving for a and b you could start with something like this: $Assumptions = (v1 | v2 | v3) \[Element] Vectors[n, Reals] && n \[Element] Integers && n >= 1 && a \[Element] Reals && b \[Element] Reals && c \[Element] Reals && c >= 0 then Reduce[TensorExpand[(v1 + a v2 + b^2 v3).(v1 + a v2 + b^2 v3)] == c^2, {a, b}] // FullSimplify - this takes a while to evaluate (Mathematica 9). –  Stephen Luttrell May 24 at 22:49

1 Answer 1

Maybe you need to define your vectors as follows:

V1 = Table[Symbol["v1" <> ToString[i]], {i, 3}]
V2 = Table[Symbol["v2" <> ToString[i]], {i, 3}]
V3 = Table[Symbol["v3" <> ToString[i]], {i, 3}]

(V1.V2 + V3)[[1]]

(*


v11 v21 + v12 v22 + v13 v23 + v31
*)
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.