Matrices/physics 

Hello everyone, I'm stuck on this question and help would be very much appreciated. I get particularly confused with the sign conventions when applying KCL and KVL. Somehow I have to incorporate matrices when solving the equations. And sorry that the picture comes as a link, I don't have enough reputation to post images :(
I have down 6 equations, 2 from applying KVL and 4 from applying KCL. But is there more as well?

 A: Well, I don't get how and why you have such a huge systems. :) There should be a matrix 3 by 3. The amount of the equations is defined as follows. You have:


*

*$N_{KCL}=N_{node}-1$ equations, constructed applying KCL, where $N_{node}$ - is the number on nodes. (Because the equation for the last $N_{node}$th node will be the linear combination of the equations for the previous $N_{node}-1$ nodes).

*$N_{KVL}=N_{branch}-N_{c.source}-N_{KCL}$ equations, constructed applying KVL, where $N_{branch}$ - is the number of branches and $N_{c.source}$ - is the number of current sources. First, one should mention, that we deal with currents in branches (not through individual elements), because according to Ohms law the current in all the elements of the branch is the same. Generally $N_{KVL}$ defines the number of independent unknown currents (in branches), that's why we have to subtract $N_{c.source}$, because the current in the branch with the current source is known.


So, you have 1 equation, constructed with KCL and 2 with KVL. 3 in total.
Let's assume that a simplified circuit:

Here all the loops are passed in a clockwise direction.
We will find currents in the branches and then just use the fact, that it is the same for all the elements in one branch.
So the system, constructed with KCL and KVL will look like:
$$\left\{\begin{matrix}\hat{i}_1-\hat{i}_2-\hat{i}_3=0 & \\ R\hat{i}_1+R\hat{i}_2=V & \\ -R\hat{i}_2+R\hat{i}_3=0   \end{matrix}\right.$$
Or in matrix notation:
$$
\pmatrix{1&-1&-1\\
R&R&0\\0&-R&R
}\pmatrix{\hat{i}_1\\ \hat{i}_2\\ \hat{i}_3}
=\pmatrix{0\\ V\\ 0}$$
Or  $Z.I=V$, where $Z$ -matrix of given impedances, $I$ - vector of unknown currents, $V$ - vector of given voltages of emfs.
So the solution will look like: $I=Z^{-1}.V$
After that you can find all the currents, just setting $\hat{i}_1=i_1=i_2=i_6$,  $\hat{i}_1=i_7$,  $\hat{i}_3=i_3=i_4=i_5$.
 And if you try to construct the system for all the currents (at the very beginning) you will come out with an overdetermined system. Which will be redundant. 
A: The first equation is based on the first law, applied to the first circle with $i_2,i_7,i_6,i_1$. The other equation is based on the second law, for the point at the meeting of $i_2,i_3$ and $i_7$. The direction of $i_3$ and $i_7$ are out from the vertex, so they come with $-$ sign.
As you added in the comments, and writing two more, we have the following equations:
$$\begin{align} 
i_3R +i_4R-i_7R&=0 \\i_2R+i_7R-V&=0 \\ 
i_1-i_2&=0 \\
i_2-i_3-i_7&=0 \\
i_3-i_4&=0 \\ i_7+i_5-i_6&=0 \\
i_6-i_1&=0 \\
i_4-i_5&=0\,.
\end{align}$$
This can be written as an equation with a matrix and culomn vectors:
$$\pmatrix{0&0&R&R&0&0&-R \\
0 & R &0&0&0&0& R\\1&-1&0&0&0&0&0\\
0&1&-1&0&0&0&-1\\
0&0&1&-1&0&0&0\\ 0&0&0&0&1&-1&1\\ -1&0&0&0&0&1&0 \\
0&0&0&1&-1&0&0 
}\pmatrix{i_1\\i_2\\ \vdots \\ i_7}
=\pmatrix{0\\ V\\ 0\\ \vdots}$$
However, in this particular situation, probably it's much better to reduce first the system of equations (e.g. using $i_6=i_1=i_2$ and $i_3=i_4=i_5$), and then solve the remaining system using a smaller matrix equation.
