Suppose I have a complicated electric circuit which is composed exclusively of resistors and voltage and current sources, wired up together in a complicated way. The standard way to solve the circuit (by which I mean finding the voltage across, and current through, each circuit element) is to formulate Kirchhoff's laws for both current and voltage, and these will yield linear equations which enable one to solve for all the relevant quantities.

However, there are two problems with these laws:

  • There are too many of them. For example, in the simple circuit below, there are three different possible loops one can draw, but only two independent voltages. Similarly,

  • The equations are not all independent. In the circuit below, the current conservation equations for the two different nodes turn out to be exactly the same equation.

Fortunately, in real life, these problems happen to exactly cancel out, and one gets exactly the correct number of equations to solve the circuit. There are never too many contradicting constraints (the linear system is never overdetermined) and there are always enough equations to pin everything down (the linear system is never underdetermined).

Why is this? Is there a simple proof of this fact? What are the fundamental reasons for it?

  • 1
    $\begingroup$ For a detailed discussion and proof, see chapter 12 in volume 2 of a course in mathematics for students of physics. amazon.com/Course-Mathematics-Students-Physics-Bk/dp/0521332451 $\endgroup$ Feb 18, 2015 at 14:10
  • 1
    $\begingroup$ The concept of homology and cohomology in electrical circuits is quite relevant here (cf. this & this). The number of essential loops (1-cocycles) is given by the first Betti number while the voltages form the 1-coboundaries. In fact, the study of homology was partly inspired by the study of Kirchoff's laws (cf. Weyl's 1923 paper). $\endgroup$
    – user199113
    Apr 27, 2020 at 14:43
  • $\begingroup$ A very simple proof can be found here $\endgroup$
    – Christophe
    Jan 18, 2022 at 8:46
  • $\begingroup$ @Christophe That link looks very susceptible to link rot, and therefore not particularly useful. For clarity, the link you just posted goes to an eprint of "Proof of the Number of Independent Kirchhoff Equations in an Electrical Circuit", P. Feldmann & R.A. Rohrer, IEEE T. Circuits Sys. 38, 681 (1991). $\endgroup$ Jan 19, 2022 at 14:51

5 Answers 5


The answer is not quite simple, to show this we need some graph theory and matrices. There is a beautiful document explaining this relation in detail:

Graphs, matrices, and circuit theory. Takis Konstantopoulus, February 2000.

Available at Semantic Scholar; original link at Uppsala University (now dead; archived version).

I think the "fundamental reason" of this is related with the fact that every loop have different variables, if we can generate a loop using another loop the equations will not be independent, of course this is my opinion, all the math is in the document.

  • 1
    $\begingroup$ The math is actually quite accessible. The notion of a spanning tree is fairly intuitive, and from there each edge not in the spanning tree links two nodes from the tree. As those 2 nodes share a single unique ancestor in the tree, this defines a unique cycle. $\endgroup$
    – MSalters
    Feb 19, 2015 at 10:40
  • 1
    $\begingroup$ The document doesn't really address the issue raised by Ryan Hazelton's answer. In section 10, they say, "We present the solution to “any” linear circuit. First, we assume that the circuit is well-defined. We leave this notion vague, but what we mean is that the circuit should not contain, for example, current sources connected in a way that they violate KCL, neither voltage sources violating KVL." But ... this means that they haven't really solved the problem in general. $\endgroup$
    – user4552
    Dec 4, 2019 at 21:51

Here's a counterexample:

Suppose two identical, ideal batteries (with zero internal resistance) are both connected in parallel across a single resistor; equivalently, replace one of the resistors in your diagram with a second, identical battery. Also assume the conducting wires are ideal (again, no resistance).

Kirchhoff's laws in this case result in an underdetermined system. If the current through the single resistor is I and the voltage across both ideal batteries is V, you cannot find the current through either battery using Kirchoff's laws alone; both loops give the voltage across the resistor as V, and both junctions say the sum of the currents through the batteries must equal I, but do not allow you to calculate either of those currents. For instance, a current of 3 I up through one battery and 2 I down through the other satisfies the system of equations. In this case you have to use a symmetry argument to conclude the current through each battery is I/2.

This is not a problem using real-world equipment, though, as voltage sources always have some amount of associated internal resistance. So if we agree to use non-ideal circuit elements, then I agree with the answer @Hu provided.

This indirectly raises another question; are Kirchoff's laws meaningful in ideal circuits? I'm sure there are many more examples like the one above, where the resulting system of linear equations is underdetermined (though I doubt there are cases which are overdetermined). We use ideal situations to model real systems, but is that a good idea when answers are undetermined in the ideal case?

  • $\begingroup$ And the mirror system (overdetermined) has two current sources in a cycle, but with opposite current directions. $\endgroup$
    – MSalters
    Feb 19, 2015 at 10:36
  • 5
    $\begingroup$ In ideal circuit theory, connecting two ideal voltage sources in parallel is, in general, an invalid circuit for the same reason that it is invalid to connect two ideal current sources in series since, in general, a contradiction results, e.g., 1 = 2. There are valid examples of under-determined circuits with dependent (controlled) sources. $\endgroup$ Feb 19, 2015 at 12:11
  • $\begingroup$ @AlfredCentauri: That doesn't really address the issue. The issue would be how you would recognize whether the voltage sources in a complicated circuit were consistent or not. $\endgroup$
    – user4552
    Dec 4, 2019 at 21:50
  • $\begingroup$ @BenCrowell, my comment goes to the author's example of two ideal voltage sources in parallel which is, in general, invalid. Although it's been some time since I left the comment, I don't recall that I intended to address any issue but that. I do recall, from quite a few years ago, analyzing an "active transformer" (ideal op-amp circuit converting a single-ended signal to balanced signal) with the odd property that, although the differential output voltage was well defined, the common-mode output voltage was undetermined by the circuit equations (which yielded $v_{O,cm} = v_{O,cm}$) $\endgroup$ Dec 5, 2019 at 1:43
  • $\begingroup$ @BenCrowell, now I understand why my old comment got some attention. I just noticed the bounty! I suppose the answer to the OPs question is that there are undetermined circuits that don't flirt with the pathological. $\endgroup$ Dec 5, 2019 at 1:55

This answer is adapted from Problem 1.4 in Používáme lineární algebru, a book of solved problems in linear algebra (freely accessible online but unfortunately only in Czech, AFAIK). I will show that with the following assumptions:

  • We deal with a DC or (low-frequency) AC circuit whose only elements are resistors and ideal voltage sources,
  • Every edge of the circuit carries nonzero (positive) resistance,

Kirchhoff's circuit laws give a unique solution for the current and voltage on every element of the circuit.

First some comments. The uniqueness is easy to understand on physical grounds. Linearity of Kirchhoff's laws implies that there can only be more than one solution if the same circuit with the sources removed (i.e. their voltage set to zero without changing the topology of the circuit) can support nontrivial currents. The assumption of positive resistance of every edge of the circuit makes this physically impossible due to energy conservation. For the same reason, I believe the same statement holds for AC circuits with other elements than resistors as long as the impedance of every edge has a positive real part. It is however not immediately obvious to me how the below argument generalizes to this case. One can also easily see that dropping the assumption of positive resistance may lead to both ambiguities in the solution and pathologies: see the answers by Ryan Hazelton and Alfred Centauri. Finally, the same argument should apply to circuits with ideal current sources due to the duality between the two types of sources; the assumption of ideal voltage sources is just for simplicity of notation.

Now to the business. I will assume WLOG that the circuit is represented by a connected graph; otherwise one simply considers all connected components one by one. The argument essentially follows the node-voltage method. In the first step, we realize that Kirchhoff's second (voltage) law is equivalent to the existence of a potential on the graph. Suppose that the circuit has $N$ vertices (nodes). We can choose the potential of one of them arbitrarily, say $u_1=0$. For a given solution of Kirchhoff's laws, we can then obtain the potential $u_i$ of the $i$-th vertex by adding up voltage drops over resistors and voltages delivered by sources over any path connecting the $i$-th vertex to $u_1$. Kirchhoff's second law guarantees that the result for $u_i$ is independent of the choice of the path, and thus well-defined.

In the second step, we deal with a set of equations for the unknown potentials $u_2,\dotsc,u_N$, implied by Kirchhoff's first (current) law. We only consider vertices $2,\dotsc,N$, which gives $N-1$ equations for the $N-1$ unknown potentials. The equation for the $i$-th vertex reads symbolically $$ \sum_j\frac1{R_{ij}}(u_i-u_j+U_{ij})=0, $$ where the sum is over all vertices $j$ connected to $i$ by an edge, $R_{ij}$ denotes the resistance in the edge $ij$, and $U_{ij}$ the voltage delivered by sources therein. We can write this set of equations in the matrix form, $M\vec u=\vec U$, where $\vec u=(u_2,\dotsc,u_N)^T$ and $\vec U$ contains the source data. The diagonal elements of the matrix $M$ are $$ M_{ii}=\sum_j\frac1{R_{ij}}, $$ whereas the offdiagonal elements are $$ M_{ij}= \begin{cases} -1/R_{ij}\text{ if $i$ and $j$ are connected and $j\neq1$,}\\ 0\text{ otherwise.} \end{cases} $$ The positivity of all the resistances implies that $$ \sum_{j\neq i}|M_{ij}|\leq|M_{ii}| $$ for all $i=2,\dotsc,N$. Moreover, there are such $i$ (those connected by an edge to $u_1$) for which the strict inequality holds. This implies that the matrix $M$ is diagonally dominant, and hence invertible. This guarantees that the set of equations for the potentials $u_2,\dotsc,u_N$ has a unique solution.

Once all the potentials are known, the currents through all the edges of the circuit are easily reconstructed. The current through the edge $ij$ is, symbolically, $$ I_{ij}=\frac1{R_{ij}}(u_i-u_j+U_{ij}). $$ This concludes the argument, and shows mathematically why the assumption of positive resistances is a sufficient condition for establishing the existence of a unique solution. More generally, a unique solution exists whenever the above-defined matrix $M_{ij}$, which depends on the topology of the circuit and the resistances but not on the sources, is nonsingular. Should $M_{ij}$ be singular, there can be more than one solution, or no solutions at all, as known from linear algebra.

EDIT: In response to the comments by Titti, here are some more details justifying why the matrix $M$ is invertible. From the corresponding Wikipedia page, a matrix is invertible if (i) it is diagonally dominant, (ii) the sharp inequality (strict diagonal dominance) holds at least for one diagonal element, and (iii) it is irreducible. The first two conditions are explicitly verified above. Irreducibility means that the indices cannot be partitioned into two sets $I,J$ such that $M_{ij}=0$ for all $i\in I$ and $j\in J$. Should the matrix $M$ be reducible, then the nodes of the circuit corresponding to the sets $I$ and $J$ would necessarily be disconnected, unless our circuit consists of two subcircuits that are only "touching" at vertex 1. But such subcircuits can always be treated as separate. With the assumption that the circuit is connected, the condition (iii) can therefore also be considered satisfied.

  • $\begingroup$ I like that you mention the requirement of positive resistance. In the example that I give in my answer, the VCCS acts a resistor with a resistance of $-1\Omega$ thus canceling the resistance of the $1\Omega$ resistor. The undetermined series current is a result of this cancellation. $\endgroup$ Dec 5, 2019 at 20:51
  • $\begingroup$ @AlfredCentauri Yes, precisely! $\endgroup$ Dec 5, 2019 at 20:58
  • 1
    $\begingroup$ I don't understand how this addresses existence, which was pointed out in Ryan Hazelton's answer, and which is not addressed satisfactorily in the paper by Konstantopoulus, who says, "We leave this notion vague, but what we mean is that the circuit should not contain, for example, current sources connected in a way that they violate KCL, neither voltage sources violating KVL." Nobody here seems to have suggested any clear criterion for recognizing when a circuit violates this requirement. $\endgroup$
    – user4552
    Dec 6, 2019 at 5:11
  • $\begingroup$ Tomáš, I do have a quick question regarding the statement "Linearity of Kirchhoff's laws implies that there can only be more than one solution if the same circuit with the sources removed can support nontrivial currents". Is it removed or should it be zeroed? $\endgroup$ Dec 6, 2019 at 15:35
  • $\begingroup$ @BenCrowell, it's not clear to me what you're asking for. In general, parallel (series) connected voltage (current) sources violate KVL (KCL) by inspection. The special case where the sources are identical violates the superposition theorem. Question: do you question the existence of a unique solution (in this context) when there is just one independent source? $\endgroup$ Dec 6, 2019 at 15:43

there are always enough equations to pin everything down (the linear system is never underdetermined).

Here's a simple ideal circuit, consisting of a voltage controlled current source (VCCS) and a resistor, where the resistor current $I_R$ is undetermined by the circuit equations:

enter image description here

The voltage across the resistor (top terminal is positive) is given by Ohms law:

$$V_R = I_R\cdot 1\Omega$$

The VCCS control voltage equals $V_R$ by KVL, and the resistor current equals the VCCS current by KCL. Thus, the resistor current is given by

$$I_R = V_R \cdot 1\mho$$

and so the circuit equations yield

$$ I_R = I_R\cdot 1\Omega\cdot 1\mho = I_R$$

That is, any value for $I_R$ solves this circuit.

Update to address this comment:

The question lists what components are allowed. A VCCS isn't one of them. – Ben Crowell 1 hour ago

In fact, the question lists (1) resistors, (2) voltage sources, and (3) current sources as the allowed components according to the opening sentence:

Suppose I have a complicated electric circuit which is composed exclusively of resistors and voltage and current sources...

Now a VCCS is a current source. The term "current source", unqualified with either independent or dependent (controlled), may refer to either type.

An ideal current source generates a current that is independent of the voltage changes across it. ... If the current through an ideal current source can be specified independently of any other variable in a circuit, it is called an independent current source. Conversely, if the current through an ideal current source is determined by some other voltage or current in a circuit, it is called a dependent or controlled current source.

It may be that Emilio is only interested in circuits with independent sources for this question. But it certainly isn't the case that the question explicitly states that, nor is it the case that one could rationally conclude that dependent sources are obviously excluded from consideration.

So, unless and until Emilio edits his question to explicitly state that only circuits with resistors and independent sources are to be considered, I will leave this answer as is.

  • $\begingroup$ The question lists what components are allowed. A VCCS isn't one of them. $\endgroup$
    – user4552
    Dec 5, 2019 at 16:45
  • $\begingroup$ @BenCrowell, I see. So, on your view, when Emilio writes "composed exclusively of resistors and voltage and current sources", he explicitly means independent voltage and current sources? Also, and just to be sure, Emilio stipulates in the same sentence that the circuit is "complicated". May I reasonably conclude that you also object to my example because it is a simple circuit rather than a complicated circuit? $\endgroup$ Dec 5, 2019 at 17:35
  • $\begingroup$ I didn't think it was necessary to specify in the question that answers needed to apply common sense, and I still don't see how that makes it to an edit to the question, so I'll state it here: answers need to apply common sense. This one doesn't. -1 from my part. $\endgroup$ Dec 6, 2019 at 19:46
  • $\begingroup$ @EmilioPisanty, I can't help but smile. $\endgroup$ Dec 6, 2019 at 20:38

The second problem solves the first one. If enough data are known from measurement, then the state of the system is determined uniquely. If more than enough data were measured this will not impact the solution, unless of course Kirchhoff's assumptions are not met or Maxwell's equations are flawed.

As to the requested fundamental reasons, Kirchhoff's laws follow directly from Maxwell's equations, which imply current conservation and the vanishing of ${\bf \nabla} \times {\bf E} $ under Kirchhoff's assumptions.

  • $\begingroup$ If it was this trivial, then the paper linked to from Hu Al's answer wouldn't have had to be written. The issue is how to show that the equations are independent. $\endgroup$
    – user4552
    Dec 5, 2019 at 16:46
  • $\begingroup$ @BenCrowell If my answer is correct, the paper need not have been written. So it boils down to this : is my answer correct? $\endgroup$
    – my2cts
    Dec 5, 2019 at 18:30
  • $\begingroup$ From the negative appraisal I conclude that some of us feel the answer is incorrect but are not competent to state why. $\endgroup$
    – my2cts
    Dec 6, 2019 at 15:44
  • 1
    $\begingroup$ @my2cts Your two statements are correct. But the first statement is very generic, and basically just explains where Kirchhoff's laws come from. I believe that Emilio Pisanty is asking for an insight taking these laws as the starting point. Since Kirchhoff's laws are not fundamental as Maxwell's equations are, but rather provide a framework for a model description of electric circuits, this is a perfectly legitimate question that your answer does not address. For completeness: your second statement says nothing specifically about Kirchhoff's laws or electric circuits. $\endgroup$ Dec 6, 2019 at 19:27
  • 1
    $\begingroup$ This post is not correct, nor is it an answer to the question,for reasons already explained in the comments under the question that predate this post. $\endgroup$ Dec 6, 2019 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.