When are the roots of polynomials with rational coefficients rationally independent? Im wondering, for a polynomial $P(x)=x^n+a_{n-1}x^{n-1}+\cdots+a_0$, $a_i \in \mathbb Q$ with roots $\alpha_1,\dots,\alpha_n \in \mathbb C$.
Under what conditions are $\alpha_i$ rationally independent?, i.e. $\forall \lambda_i\in \mathbb Q$
$$\sum_i \lambda_i\alpha_i=0 \rightarrow \lambda_1=\lambda_2=\dots=\lambda_n=0$$
It seems clear that since $\sum_i \alpha_i=-a_{n-1}$, one needs that $a_{n-1}\neq 0$, all $\alpha_i\not\in \mathbb Q$ and also P(x) needs to be irreducible over $\mathbb Q$ since for $P(x)=Q(x)R(x)$  one has $$\frac{1}{ a^Q_{n_Q-1}}\sum_i \alpha_i^{Q}-\frac{1}{ a^R_{n_R-1}}\sum_i \alpha_i^{R}=0$$ with $\alpha^Q,a^Q$ the roots and coefficients of Q.
Are there any other conditions that have to be met? The Galois group being $S_n$ appears to be enough but also too strong of a requirement. I appreciate any help.
Also in case of rational dependence, is it possible to find a rationally independent basis for the roots efficiently?
Edit: I would really also appreciate a counter example, i.e. an irreducible polynomial $P(x)$ of degree $n>1$ (implies $\alpha_i\not\in\mathbb Q$), where $a_{n-1}\neq 0$, but rational dependence between the roots of $P(x)$.
 A: Not a complete answer. $P(x)$ irreducible and $a_{n-1} \neq 0$ are necessary, as you say. I don't understand your notation regarding the reducible case, but if $P(x) = Q(x) R(x)$ then the roots of $Q(x)$ sum up to something rational and so do the roots of $R(x)$, so some rational linear combination of these two sums is zero.
Next, if $P(x)$ is irreducible and $a_{n-1} \neq 0$, write $I$ for the set of roots of $P(x)$, where the root corresponding to $i \in I$ is denoted $\alpha_i$, and write $G$ for its Galois group. Consider the space $V$ of vectors $(\lambda_i) \in \mathbb{Q}^I$ such that $\sum \lambda_i \alpha_i = 0$; since applying an element of the Galois group to such a linear dependence produces another linear dependence, $V$ is a $G$-submodule of $\mathbb{Q}^I$. Averaging over $G$, we get that if $\sum \lambda_i \alpha_i = 0$ then
$$\frac{1}{|G|} \sum_{g \in G} g \sum \lambda_i \alpha_i = \sum \lambda_i \frac{\sum \alpha_i}{n} = 0$$
so if $a_{n-1} \neq 0$ then $\sum \lambda_i = 0$; so our $G$-module $V$ of linear dependencies lives in the submodule of $\mathbb{Q}^I$ of vectors summing to zero. Call this submodule $W$.

Proposition: $W$ is irreducible iff $G$ acts doubly transitively on the roots.

Proof. Write $\chi$ for the character of $W$. Then $\chi + 1$ is the character of $\mathbb{Q}^I$, which is $\text{Fix}(g)$, the number of fixed points of $g \in G$ acting on the roots. Hence
$$\langle \chi + 1, \chi + 1 \rangle = \frac{1}{|G|} \sum_{g \in G} \text{Fix}(g)^2$$
and by Burnside's lemma this is the number of orbits of $G$ acting on $I \times I$. On the other hand, $\langle \chi + 1, \chi + 1 \rangle = \langle \chi, \chi \rangle + 1$ ($\langle \chi, 1 \rangle = 0$ because the action of $G$ on the roots is always transitive, which gives $\langle \chi + 1, 1 \rangle = 1$, again by Burnside's lemma). So $\chi$ is irreducible iff $\langle \chi, \chi \rangle = 1$ iff $G$ has exactly two orbits on $I \times i$, which is exactly the condition that $G$ acts doubly transitively (since the diagonal $(i, i)$ is always an orbit). $\Box$

Corollary: With the above hypotheses, if $G$ acts doubly transitively on the roots then the roots are linearly independent.

This implies in particular that the roots are linearly independent if $G = S_n$ but various other Galois groups are possible, such as the affine linear groups $AGL_1(\mathbb{F}_p) \cong \mathbb{F}_p \rtimes \mathbb{F}_p^{\times}$ acting on $\mathbb{F}_p$.
Proof. If $G$ acts doubly transitively on the roots then it acts irreducibly on $W$, as above. It follows that if $\sum \lambda_i \alpha_i = 0$ is a nontrivial linear dependence among the roots then $V$ is nonzero, hence (by irreducibility) must be all of $W$. But $W$ contains all permutations of vectors of the form $(1, -1, \dots 0)$, which gives that $\alpha_i - \alpha_j = 0$ for all $i \neq j$; contradiction. So $V = 0$, meaning there are no nontrivial linear dependencies among the roots. $\Box$
This condition is not necessary, since for example the roots of $P(x) = \frac{x^p - 1}{x - 1} = \Phi_p(x)$, for $p$ a prime, are also linearly independent but the Galois group, which is $\mathbb{F}_p^{\times}$, does not act double transitively. Apparently it's known that the primitive $n^{th}$ roots of unity (so the roots of $\Phi_n(x)$) are linearly independent iff $n$ is squarefree but I don't know a proof or reference.
Edit: Ah, I've missed an obvious generalization that covers the case of $\Phi_p(x)$. Double transitivity actually shows that $W \otimes_{\mathbb{Q}} \mathbb{C}$ is irreducible, whereas for the above argument to go through it suffices that $W$ itself is irreducible, over $\mathbb{Q}$, which is true in the case of $\Phi_p(x)$. I don't know how to check irreducibility over $\mathbb{Q}$ in general, though. I guess it is necessary and sufficient that the irreducible components of $W$ over $\mathbb{C}$ form a single Galois orbit.
