How can we be sure that we can equate coefficients? I'm studying about vectors and there's a question that equates 2 expressions of the same vector and requires me to find k and r:
(1-k)b + 3ka = (1-r)a + 3rb
k and r are scalar values.
How do I definitively know that the only way for the two sides to be equal is for the coefficients of a and b to be equal on both sides? Is there a way to prove it? How do you know that there is no other combination of values that will allow both sides to equate?
I'm sorry if my phrasing of the question sounds weird, I can't seem to find the right way to articulate my issue.
 A: *

*$$(1-k)\mathbf b + 3k\mathbf a = (1-r)\mathbf a + 3r\mathbf b\\\iff\\
   1-k=3r\;\:\text{ and }\;\:3k=1-r$$ iff $\mathbf a$ and $\mathbf b$ are not collinear.

*$$p\mathbf a+q\mathbf b+r\mathbf c=\mathbf 0\\\iff\\p,q,r=0$$ iff $\mathbf a, \mathbf b,$ and $\mathbf c$ are not coplanar.

*In general: $$p_1\mathbf a_1+p_2\mathbf a_2+\ldots+p_n\mathbf a_n=\mathbf 0\\\iff\\p_1,p_2,\ldots,p_n=0$$ iff $\mathbf a_1, \mathbf a_2, \ldots, \mathbf a_n$ are linearly independent.


Is there a way to prove it? How do you know that there is no other combination of values that will allow both sides to equate?

The third point above is actually the definition of linear independence.
A more intuitive characterisation is this: $\{\mathbf a_1, \mathbf a_2, \ldots, \mathbf a_n\}$ is linearly dependent iff some vector in the set is a linear combination of the others.
Notice that in Euclidean space $\mathbb R^m,$

*

*when $n=2,$ the condition “some vector in the set is a linear
combination of the others” is equivalent to “the two vectors are
collinear” (i.e., one of them is a scalar multiple of the other); and

*when $n=3,$ the same condition is equivalent to “the three vectors
are coplanar”.


When the above boldfaced conditions are not met, “equating coefficients” is invalid. For example, $$p\begin{pmatrix}  1 \cr 0\end{pmatrix}+q\begin{pmatrix}  2 \cr 0\end{pmatrix}=-3\begin{pmatrix}  1 \cr 0\end{pmatrix}+4\begin{pmatrix}  2 \cr 0\end{pmatrix}\\\kern.6em\not\kern-.6em\implies p=-3,\;q=4;$$ the unknown tuple $(p,q)$ could well have been $(1,2),(3,1),$ etc.
A: Geometrically: thinking of $(1-k) \mathbf b + (3k) \mathbf a$ as $(1-k) \mathbf b + k (3\mathbf a)$, we see that as $k$ varies over $\mathbb R$, this gives us the equation of a line through the points $\mathbf b$ and $ 3\mathbf a$. As $k$ increases, the point moves in the direction of the vector $3\mathbf a - \mathbf b$. So two different values give two different points along the line.
Algebraically: we can think of $(1-k)\mathbf b + (3k)\mathbf a = (1-r)\mathbf b + 3r\mathbf a$ as a sequence of $n$ equations (if $\mathbf a, \mathbf b \in \mathbb R^n$) of the form $(1-k)b_i + 3k a_i = (1-r) b_i + 3r a_i$. We can always simplify this to $k(3a_i - b_i) = r(3a_i - b_i)$, and if $3a_i - b_i \ne 0$ (for at least one $i$) then we conclude $k=r$.
In either case, we see that if $3\mathbf a = \mathbf b$, then we can't conclude that $k=r$. In the first case, because the line is degenerate and becomes a single point; in the second case, because we cannot divide by $3a_i - b_i$ for any $i$.
