$$
H_i(x) = \begin{cases} (x-x_{i-1})/(x_i-x_{i-1}), & x_{i-1}\le x\le x_i, \\
(x_{i+1}-x)/(x_{i+1}-x_i), & x_i\le x\le x_{i+1}, \\
0, & \text{otherwise}.
\end{cases}
$$

How can I prove the functions shown in the picture are linearly independent? I've tried the following proof, but it doesn't make sense to me at the end, and I comment why (however, I would like additional feedback on my proof):
Suppose $\exists c_1, c_2, \dots, c_n : n \in \Bbb{N}$ such that $c_1H_1 + c_2H_2 + \dots + c_nH_n = 0$. Notice that if $H_k = 0$ then the term is eliminated from the equation, and if multiple of the hat functions are equal, we group like terms to get $\alpha_1H_1 + \alpha_2H_2 =$ $$\alpha_1\left(\frac{x-x_{i-1}}{x_i - x_{i-1}}\right) + \alpha_2\left(\frac{x_{i+1}-x}{x_{i+1} - x_i}\right) = 0$$
where $\alpha_g$ is some arbitrary constant, and $g \in \{1, 2\}$.
Now I think this proof is wrong in this step because the multiplicands aren't in the same interval. I won't continue to post the rest of the proof, of course, but it only entails expanding these terms (and then I don't know what to do after expansion of the terms).
suppose $$k_1H_1(x) + k_2H_2(x)+ \cdots + k_n H_n(x) = 0. \tag 1$$ evaluation the identity at $x = x_1$ gives you $k_1 = 0.$
in the same way evaluating at $x_2, x_3, \cdots, x_n$ give $k_2 = 0, k_3 = 0, \cdots, k_n = 0.$ therefore $\{H_1, H_2,\cdots, H_n \}$ is linearly independent.