\subsection{Kirchhoff's Junction and Loop Rules}

This subsection introduces Kirchhoff's two rules for analyzing electric circuits. The junction rule (Kirchhoff's current law) expresses charge conservation at circuit nodes. The loop rule (Kirchhoff's voltage law) expresses energy conservation around any closed loop. Together they provide a systematic method for finding unknown currents in multi-loop circuits.

\dfn{Electric circuit junction (node)}{A \emph{junction} (or \emph{node}) is a point in a circuit where three or more conductors meet. The current in each conductor leading to the junction is called a \emph{branch current}.}

\nt{In a steady-state dc circuit the charge at any junction is constant: no charge accumulates at a node. This is the physical reason the junction rule holds.}

\thm{Kirchhoff's junction rule (KCL)}{At any junction in a steady-state dc circuit, the sum of currents entering the junction equals the sum of currents leaving the junction:
\begin{equation}
\sum I_{\text{in}} = \sum I_{\text{out}}.
\end{equation}
Equivalently, the algebraic sum of all currents at a junction is zero:
\begin{equation}
\sum I = 0,
\end{equation}
where currents entering the junction are taken as positive and currents leaving are taken as negative.

\textbf{Calc 3 connection:} The junction rule is the circuit analogue of the steady-state continuity equation $\nabla \cdot \vec{J} = 0$ (charge conservation with no time-varying charge density). Integrating $\nabla \cdot \vec{J} = 0$ over a small volume enclosing the junction gives $\oiint \vec{J} \cdot d\vec{A} = 0$, which is exactly $\sum I = 0$.}

\dfn{Electric circuit loop}{A \emph{loop} is any closed path through a circuit, traversing a sequence of circuit elements and returning to the starting point.}

\dfn{Sign convention for traversing circuit elements}{When applying the loop rule, traverse the loop in a chosen direction and assign potential changes as follows:
\begin{itemize}
\item \emph{Resistor:} Traversing in the \emph{same} direction as the assumed current gives a potential \emph{drop} of $IR$ (contribute $-IR$). Traversing \emph{opposite} to the assumed current gives a potential \emph{rise} of $IR$ (contribute $+IR$).
\item \emph{Battery (emf):} Traversing from the \emph{negative} terminal to the \emph{positive} terminal gives a potential \emph{rise} of $\mathcal{E}$ (contribute $+\mathcal{E}$). Traversing from \emph{positive} to \emph{negative} gives a potential \emph{drop} of $\mathcal{E}$ (contribute $-\mathcal{E}$).
\end{itemize}
The assumed direction of each branch current must be declared before writing equations. If the solved value of a current is negative, the actual current flows opposite to the assumed direction.}

\thm{Kirchhoff's loop rule (KVL)}{For any closed loop in a circuit, the algebraic sum of the potential differences across all elements in the loop is zero:
\begin{equation}
\sum \Delta V = 0.
\end{equation}

\textbf{Calc 3 connection:} The loop rule follows from energy conservation: a test charge $q$ that moves around a closed path and returns to its starting point must have zero net change in potential energy, so $\oint \vec{E} \cdot d\vec{\ell} = 0$. In electrostatics this is a consequence of $\vec{E}$ being a conservative field. More generally, in quasi-static circuits with no changing magnetic flux through the loop, Faraday's law gives $\nabla \times \vec{E} = -\partial \vec{B}/\partial t = 0$, so the integral over any closed loop vanishes.}

\nt{The loop rule holds for \emph{any} closed loop, not just the obvious ``mesh'' loops of a circuit diagram. Any closed path through the elements counts. In practice one typically chooses the minimal loops (meshes) because they lead to the most economical system of equations.}

\nt{The sign of a solved current encodes direction. A negative result does \emph{not} mean the current is unphysical --- it simply means the actual current is opposite to the assumed direction. Always state the assumed direction and report the final direction clearly.}

\mprop{Algorithm for solving multi-loop circuits}{Given a multi-loop circuit with unknown branch currents:
\begin{enumerate}
\item Label every branch with a current variable and an assumed direction.
\item Identify all junctions. For $N$ junctions, write $N-1$ independent junction equations.
\item Choose enough independent loops (typically meshes) so that the total number of equations (junction + loop) equals the number of unknown currents.
\item Apply the loop rule to each chosen loop, using the sign conventions above.
\item Solve the resulting system of linear equations.
\item Check: any current with a negative value flows opposite to the assumed direction. Verify that all junction equations are satisfied.
\end{enumerate}
The number of independent equations needed equals the number of unknown branch currents.}

Kirchhoff's rules generalize the equivalent-resistance method from Section 11.4. For single-battery circuits with pure series/parallel arrangements, equivalent resistance is faster. Kirchhoff's rules become necessary when multiple batteries or loops make reduction impossible.

\ex{Illustrative example}{Consider a junction with three wires meeting. Current $I_1 = 3.0\,\mathrm{A}$ enters the junction and current $I_2 = 1.5\,\mathrm{A}$ leaves. The third branch carries current $I_3$. By the junction rule, $I_1 = I_2 + I_3$, so $I_3 = 1.5\,\mathrm{A}$ leaves the junction.}

\nt{For circuits with a single battery and resistors in simple series or parallel, the equivalent-resistance method is faster. Kirchhoff's rules are needed whenever the circuit cannot be reduced to simple series/parallel combinations --- for instance, when there are two or more batteries arranged in different branches, forming multiple loops.}

\qs{Worked example}{Consider the two-loop circuit shown in the diagram below. The circuit consists of a left loop and a right loop sharing a common middle branch.

\begin{itemize}
\item The \emph{left branch} contains a battery of emf $\mathcal{E}_1 = 12\,\mathrm{V}$ (positive terminal up) in series with a resistor $R_1 = 4.0\,\Omega$.
\item The \emph{middle branch} contains a resistor $R_3 = 3.0\,\Omega$.
\item The \emph{right branch} contains a battery of emf $\mathcal{E}_2 = 6.0\,\mathrm{V}$ (positive terminal up) in series with a resistor $R_2 = 6.0\,\Omega$.
\end{itemize}

\begin{center}
\textbf{Diagram description:} Two rectangular loops share a vertical middle branch. The left vertical branch has the $12\,\mathrm{V}$ battery (positive up) and $4.0\,\Omega$ resistor. The middle vertical branch has the $3.0\,\Omega$ resistor. The right vertical branch has the $6.0\,\mathrm{V}$ battery (positive up) and $6.0\,\Omega$ resistor. All three vertical branches connect at top and bottom horizontal wires (ideal conductors with zero resistance).
\end{center}

Let the top junction be $A$ and the bottom junction be $B$. Define three branch currents:
\begin{itemize}
\item $I_1$ flows \emph{upward} through the left branch (from $B$ to $A$).
\item $I_2$ flows \emph{upward} through the right branch (from $B$ to $A$).
\item $I_3$ flows \emph{downward} through the middle branch (from $A$ to $B$).
\end{itemize}
Assume these directions when applying Kirchhoff's rules.

Find:
\begin{enumerate}[label=(\alph*)]
\item the junction equation at node $A$,
\item the two independent loop equations (left loop and right loop),
\item the values of all three currents $I_1$, $I_2$, and $I_3$, and
\item the direction of each current (consistent with the assumed direction).
\end{enumerate}}

\sol \textbf{Part (a). Junction equation.} At junction $A$, the currents $I_1$ and $I_2$ both enter (they flow upward from $B$ to $A$ in their respective branches). The current $I_3$ leaves $A$ (it flows downward from $A$ to $B$). By the junction rule:
\[
I_1 + I_2 = I_3.
\]
This is our first equation.

\textbf{Part (b). Loop equations.}

\emph{Left loop} (traverse clockwise starting from junction $B$):
\begin{itemize}
\item Go up through the left branch, in the same direction as $I_1$: the battery $\mathcal{E}_1$ is traversed from $-$ to $+$, contributing $+\mathcal{E}_1 = +12\,\mathrm{V}$. The resistor $R_1$ is traversed in the same direction as $I_1$, contributing $-I_1 R_1 = -4.0\,I_1$.
\item Go across the top wire from the left branch to the middle branch (ideal wire, $\Delta V = 0$).
\item Go down through the middle branch, in the same direction as $I_3$: resistor $R_3$ is traversed in the direction of $I_3$, contributing $-I_3 R_3 = -3.0\,I_3$.
\item Go across the bottom wire back to $B$ (ideal wire, $\Delta V = 0$).
\end{itemize}
Summing around the loop:
\[
+12 - 4.0\,I_1 - 3.0\,I_3 = 0,
\]
\[
4.0\,I_1 + 3.0\,I_3 = 12.
\]
\label{eq:loop1}

\emph{Right loop} (traverse clockwise starting from junction $A$):
\begin{itemize}
\item Go down through the right branch, in the \emph{opposite} direction to $I_2$: the resistor $R_2$ is traversed opposite to $I_2$, contributing $+I_2 R_2 = +6.0\,I_2$. The battery $\mathcal{E}_2$ is traversed from $+$ to $-$, contributing $-\mathcal{E}_2 = -6\,\mathrm{V}$.
\item Go across the bottom wire from right to middle (ideal wire, $\Delta V = 0$).
\item Go up through the middle branch, in the \emph{opposite} direction to $I_3$: resistor $R_3$ is traversed opposite to $I_3$, contributing $+I_3 R_3 = +3.0\,I_3$.
\item Go across the top wire back to $A$ (ideal wire, $\Delta V = 0$).
\end{itemize}
Summing around the loop:
\[
+6.0\,I_2 - 6 + 3.0\,I_3 = 0,
\]
\[
6.0\,I_2 + 3.0\,I_3 = 6.
\]
\label{eq:loop2}

\textbf{Part (c). Solving for the currents.} We have three equations:
\begin{align}
I_3 &= I_1 + I_2, &\text{(junction)} \\
4.0\,I_1 + 3.0\,I_3 &= 12, &\text{(left loop)} \\
6.0\,I_2 + 3.0\,I_3 &= 6. &\text{(right loop)}
\end{align}

Substitute equation (1) into equation (2):
\[
4.0\,I_1 + 3.0\,(I_1 + I_2) = 12,
\]
\[
4.0\,I_1 + 3.0\,I_1 + 3.0\,I_2 = 12,
\]
\[
7.0\,I_1 + 3.0\,I_2 = 12.
\]

Substitute equation (1) into equation (3):
\[
6.0\,I_2 + 3.0\,(I_1 + I_2) = 6,
\]
\[
6.0\,I_2 + 3.0\,I_1 + 3.0\,I_2 = 6,
\]
\[
3.0\,I_1 + 9.0\,I_2 = 6.
\]
Dividing by $3.0$:
\[
I_1 + 3.0\,I_2 = 2.0,
\]
so
\[
I_1 = 2.0 - 3.0\,I_2.
\]

Substitute equation (3) into equation (2):
\[
7.0\,(2.0 - 3.0\,I_2) + 3.0\,I_2 = 12,
\]
\[
14.0 - 21.0\,I_2 + 3.0\,I_2 = 12,
\]
\[
14.0 - 18.0\,I_2 = 12,
\]
\[
-18.0\,I_2 = -2.0,
\]
\[
I_2 = \frac{2.0}{18.0} = \frac{1}{9}\,\mathrm{A}.
\]

From equation (3):
\[
I_1 = 2.0 - 3.0\left(\frac{1}{9}\right) = 2.0 - \frac{1}{3} = \frac{6}{3} - \frac{1}{3} = \frac{5}{3}\,\mathrm{A}.
\]

From the junction equation (1):
\[
I_3 = I_1 + I_2 = \frac{5}{3} + \frac{1}{9} = \frac{15}{9} + \frac{1}{9} = \frac{16}{9}\,\mathrm{A}.
\]

\textbf{Verification.} Check against the left-loop equation:
\[
4.0\left(\frac{5}{3}\right) + 3.0\left(\frac{16}{9}\right) = \frac{20}{3} + \frac{16}{3} = \frac{36}{3} = 12.
\]
Check against the right-loop equation:
\[
6.0\left(\frac{1}{9}\right) + 3.0\left(\frac{16}{9}\right) = \frac{6}{9} + \frac{48}{9} = \frac{54}{9} = 6.
\]
Both are satisfied.

\textbf{Part (d). Directions.} All three currents are positive, confirming they flow in the assumed directions:
\begin{itemize}
\item $I_1 = 5/3\,\mathrm{A}$ upward in the left branch,
\item $I_2 = 1/9\,\mathrm{A}$ upward in the right branch,
\item $I_3 = 16/9\,\mathrm{A}$ downward in the middle branch.
\end{itemize}

Therefore, the branch currents are:
\[
I_1 = \frac{5}{3}\,\mathrm{A},\qquad
I_2 = \frac{1}{9}\,\mathrm{A},\qquad
I_3 = \frac{16}{9}\,\mathrm{A},
\]
all flowing in the assumed directions.
