Linear dependence and independence solution. How was it found? I am reading this text:

I feel like my text skipped a step to find the coefficients/solutions. Did they write a system of linear equations and use Gaussian elimination? How did they do this?
 A: They found that you can express one vector as a linear combination of the others, in your case:
$$(1,3,1)=3\cdot (0,1,2)+(1,0,-5)$$
Thus, you can rearrange the equation to form
$$\mathbf0=3\cdot (0,1,2)+(1,0,-5)-(1,3,1)$$
which is a non-trivial linear combination of $\mathbf0$, i.e. the set is per definition linearly dependent.
I guess that this relation was found by inspection. In general, eyeballing the vectors can often help to find such trivial cases and shorten your argument. However, for being sure you can always perform Gaussian elimination on the three vectors to find a maybe elusive combination.

Note that the definition

A set $S=\{s_1,\dots,s_n\}\subseteq V$ for a vector space $V$ is linearly independent if $$\sum_{i=1}^n\lambda_is_i=\mathbf0$$ has only the trivial solution $\lambda_1=\dots=\lambda_n=0$.

is equivalent with the formulation that you can not express any $s_j$ as a linear combination of the others, as you may always rearrange the resulting equation as above.
A: In order to see whether these vectors are dependent examine the system:
 $a(1,3,1)+b(0,1,2)+c(1,0,-5)=(0,0,0)$
which is equivalent with
$$\begin{pmatrix}
1 & 0 & 1\\
3 & 1 & 0\\
1 & 2 & -5
\end{pmatrix}\begin{pmatrix}
a\\
b\\
c
\end{pmatrix}=\begin{pmatrix}
0\\
0\\
0
\end{pmatrix}$$
then you can use elimination to find $a,b,c$
$$\begin{pmatrix}
1 & 0 & 1\\
3 & 1 & 0\\
1 & 2 & -5
\end{pmatrix}\to \begin{pmatrix}
1 & 0 & 1\\
0 & 1 & -3\\
1 & 2 & -5
\end{pmatrix}\to \begin{pmatrix}
1 & 0 & 1\\
0 & 1 & -3\\
0 & 2 & -6
\end{pmatrix}\to \begin{pmatrix}
1 & 0 & 1\\
0 & 1 & -3\\
0 & 0 & 0
\end{pmatrix}$$
So the above system is equivalent to the following
$$\begin{pmatrix}
1 & 0 & 1\\
0 & 1 & -3\\
0 & 0 & 0
\end{pmatrix}\begin{pmatrix}
a\\
b\\
c
\end{pmatrix}=\begin{pmatrix}
0\\
0\\
0
\end{pmatrix}\Leftrightarrow \begin{cases} a+c=0 \\ b-3c=0 \end{cases}\Leftrightarrow \begin{cases} a=-c \\ b=3c \end{cases}\Leftrightarrow \begin{pmatrix}
a\\
b\\
c
\end{pmatrix}=\begin{pmatrix}
-c\\
3c\\
c
\end{pmatrix}=c\begin{pmatrix}
-1\\
3\\
1
\end{pmatrix} $$
And we can choose $c=1$ so $(a,b,c)=(-1,3,1)$
A: Yes the book skipped some step or the Authors have find that by inspection which sometimes is possible for simple cases, here we have
$$v_1=3v_2+v_3 \iff 1\cdot v_1-3\cdot v_2-1\cdot v_3=0$$
More in general, yes we need gaussian elimination to find the coefficients which leads to non trivial solutions for $A\vec c=0$.
