# Solving a linear algebra problem of the form "For what $x$ below vectors are linearly independent?"

Let $$v_1,v_2, v_3, v_4$$ be four vectors, parametrized by $$e$$. How can I solve the following type of the problem in Mathematica?

For what values of $$e$$ four vectors $$v_i$$ are linearly independent?

The followings are an example of four vectors. vecs[[i]] is the $$i$$-th vector.

\$Assumptions = { \[CapitalDelta] > 0, 0 < \[Phi] < 2 Pi, e > 0};
vecs = {{(
E^(I \[Phi]) (-I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta], (
I E^(I \[Phi]) (-I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta], -I, 1}, {(
E^(I \[Phi]) (I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta], -((
I E^(I \[Phi]) (I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta]), I,
1}, {-((E^(
I \[Phi]) (I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta]), -((
I E^(I \[Phi]) (I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta]), -I,
1}, {-((E^(
I \[Phi]) (-I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta]), (
I E^(I \[Phi]) (-I e +
Sqrt[-e^2 + \[CapitalDelta]^2]))/\[CapitalDelta], I, 1}}


I suspect the answer is $$e= \Delta |\cos (\phi/2)|$$.

• It is the complement to the set where the determinant is zero. That in turn can be found like so In[206]:= Solve[{Det[vecs] == 0, \[CapitalDelta] > 0, 0 < \[Phi] < 2 Pi, e > 0}, e] Out[206]= {{e -> ConditionalExpression[\[CapitalDelta], \[CapitalDelta] > 0 && 0 < \[Phi] < 2 \[Pi]]}} Feb 22 at 16:36

Another way which exploits only the definition of the linear independence of vectors is as follows.

Resolve[ForAll[{c1, c2, c3, c4}, Implies[c1*vecs[[1]] + c2*vecs[[2]] + c3*vecs[[3]] +
c4*vecs[[4]] == {0, 0, 0, 0},   c1 == 0 && c2 == 0 && c3 == 0 && c4 == 0]]]


$$\Delta e^{i \phi } \sqrt{\Delta ^2-e^2}\neq 0$$

• Thanks for your answer! All answers here are great but I think this is the most direct and easily generalizable one. Feb 22 at 9:56

The determinant of the scalarproduct matrix of vecs must not vanish:

det = Outer[Dot, vecs, vecs, 1] // Det // Simplify
(*(256 E^(4 I \[Phi]) (e^2 - \[CapitalDelta]^2)^2)/\[CapitalDelta]^4*)


The four vectors are indipendent if E^2 != \[CapitalDelta]^2

another option is to use Reduce and look for solution which has all a1,a2,a3,a4 as zeros.

c = {a1, a2, a3, a4};
eqs = Thread[vecs . c == {0, 0, 0, 0}];
Reduce[eqs, {a1, a2, a3, a4}]


Looking at output shows one condition where all are zero. THis is the one you want

Therefore

This final step could be automated to pick this condition, but for now, just looking at it is enough :)