# Nodal analysis with dependent voltage source

I need help figuring this problem. I'm reviewing for my final and I can't figure out how to write the nodal equations. What I have so far is:

$$6I_x = V_2- V_1$$

KCL @ V_1: $$7A + \frac{V_1}{10} = 0$$

$$V_1(\frac{1}{10}) = -7A$$

KCL @ V_2: $$\frac{V_2}{5} +\frac{V_2}{2} = 0$$

$$V_2(\frac{1}{5} + \frac{1}{2}) =0$$

I know that the answer will be the matrix:

$$\begin{matrix} .4 & 1 & =& 0 \\ .1 & .7 & =& -7 \\ \end{matrix}$$ Writing nodal equation at ground node, $$-7 =\frac{V_1}{10} + \frac{V_2}{5} + \frac{V_2}{2}$$ $$or,\ \mathbf{0.1V_1 + 0.7V_2 = -7}$$ Writing nodal equation at $V_1$ correctly will also produce the same equation. You actually missed the term $0.7V_2$ in it.
Now, $$V_2 = V_1+6I_x$$ but, $$I_x = -0.1V_1$$ then, $$V_2 = 0.4V_1$$ $$\mathbf{0.4V_1 - V_2 = 0}$$
Writing these equations in matrix format, $$\left[ \begin{array}{cc} 0.4 & -1 \\ 0.1 & 0.7\end{array} \right]\left[ \begin{array}{c} V_1 \\ V_2\end{array} \right]=\left[ \begin{array}{c} 0 \\ -7\end{array} \right]$$