The node that is not in the circuit
Assumes: What a network answers, and how the answer is checked · The matrix that is ill, and the answer that is not
What a network answers sets out what a solve is: a circuit has exactly one answer, a matrix finds it, and the answer can be checked twice by routes that share no arithmetic. What that essay does not examine is the first line of the method, which is not a consequence of anything in the circuit.
Nodal analysis needs a node to call zero, and no circuit contains one. A circuit determines potential differences — that is what Kirchhoff’s laws are about — and it says nothing at all about where the zero of potential is. The reference node is chosen by whoever writes the netlist, and every node voltage the solve returns is a number that depends on that choice.
So there is an invariance to check and a place for it to break. The invariance is that nothing measurable depends on the choice. The place it breaks is not the circuit; it is the arithmetic.
Moving a label
Re-referencing a netlist is a relabelling and nothing more. The node chosen becomes the one the solver calls ground; the node that used to be ground becomes an ordinary named node; every element’s terminals are rewritten in place. No element is added, removed or changed, and the topology is untouched.
What comes back is a different set of node voltages. Solved four times on one six-section chain, with the reference at four different nodes, the four sets of node voltages differ — and they differ by a constant: the offset between any two of them is the same at every node, to 2.6 × 10⁻¹⁵ of a volt. Four curves, rigidly shifted.
That is the invariance, drawn. The gaps between adjacent points on a curve are the branch voltages, and those gaps are identical in all four. Where the whole curve sits vertically is a decision. A node voltage is not a measurement; it is a measurement plus a decision, and a voltmeter has two probes for exactly that reason.
The same statement holds for the currents, and it holds by a different route: every branch current is computed from the voltages across its own element, so a constant added to everything cancels. Swept across all fourteen references of a twelve-section chain, the branch voltage and the branch current both agree to about a part in ten to the fourteenth.
The matrix is not the circuit
The condition number is where the invariance stops, and it stops because the matrix is a representation rather than the thing represented.
For a twelve-section chain the condition number runs from 5.25 × 10⁴ to 1.72 × 10⁵ depending on the reference — a factor of 3.3, or about half a decimal digit. The best reference is near the middle of the chain and the worst is at its far end, which has a reading: referencing at one end makes the matrix describe one long chain, and referencing in the middle makes it describe two short ones. A short chain is better conditioned than a long one, and two of them are better than one twice as long.
On a network whose element values span decades the effect is larger. A star with a milliohm on one arm and a megohm on another has condition numbers from 1.0 × 10⁶ to 8.0 × 10⁶ across its five possible references — a factor of eight, nearly a whole digit — and the worst is the node between the kilohm and the megohm.
None of that is a defect in the method. It is the ordinary fact that a numerical problem has a conditioning and a physical one does not, and the interest is in how much it actually costs.
What it costs, measured rather than bounded
A condition number bounds the error a solve may make and does not say what error it did make. The matrix that is ill, and the answer that is not is the whole of that distinction, and the measurement it calls for is available here directly: solve the same matrix in double-double arithmetic and compare.
On the badly scaled star, the answer from four of the five references is right to the double’s own last bit — a relative error of 2 × 10⁻¹⁶ or zero. From the fifth it is 4.3 × 10⁻¹², which is four decimal digits gone.
Two things about that are worth separating. The size is modest: four digits of sixteen, on a network chosen to be awkward, and every answer is still far better than any component tolerance. And the identification is exact: the reference that loses the digits is the one the condition number picked out before the error was measured. On this network the bound is measuring the right thing, which is not always true and which is exactly what that other essay is about — and the digits the arithmetic did not have is the same question asked of the precision rather than of the matrix.
What changes between one reference and another is not the physics and not even really the matrix’s size — it is which set of equations the elimination is given and in what order it pivots through them. A different reference produces a different but equivalent system, and Gaussian elimination is not indifferent to which of two equivalent systems it is handed.
Why the offsets are exactly constant, and why that is checkable
The rigid shift is easy to state and worth deriving once, because the derivation is what says the measurement is an identity rather than a coincidence of this chain.
Kirchhoff’s current law at a node is a statement about the currents leaving it, and the current through a resistor between two nodes depends on the difference of their potentials. Add a constant to every node’s potential and every such difference is unchanged, so every branch current is unchanged, so every node’s current balance is still satisfied. The shifted set of potentials is therefore also a solution.
The reason it is the solution the solver returns is the constraint that the reference node’s potential is zero. Choose a different node for that and the constant is whatever makes the new reference zero — the negative of that node’s potential under the old reference. That is one number, the same at every node, which is what the figure measures.
What makes this checkable rather than merely true is that the argument says nothing about the size of the network or the values in it, so any departure at all is arithmetic. Measured across four references on a six-section chain, the largest disagreement between the offsets at different nodes is 2.6 × 10⁻¹⁵ volts, which is about ten times the last bit of a one-volt double and is what an elimination of that size accumulates. A failure here would not be an interesting result about circuits; it would be a bug, and that is what an invariant is for.
What this means for writing a netlist
Three practical consequences follow, and the first two are smaller than the third.
Choose a reference in the middle of a long chain rather than at one end, if there is a choice. It is worth a factor of three on the condition number of a twelve-section chain and more on a longer one. Nobody should build a tool around it.
Do not choose a node that sits between two very different impedances, which is the same scaling argument the dependent-source equivalent in the resistor that is not made of the resistors meets from the other end. That is the star’s worst reference, and the mechanism is the same one that makes any badly scaled matrix badly conditioned — the row for that node has entries differing by the scale of the two impedances, and the elimination has to subtract them.
And never read anything into a node voltage on its own. This is the consequence that matters, and it is not about accuracy. A solve reports node voltages because that is what its unknowns are, and a reader who takes one of them as a property of the circuit has read a number that would be different if the netlist had been written differently. Every claim worth making is about a difference: a branch voltage, a gain, a transfer function, a current. The site’s whole habit of checking an answer by a second route depends on the second route computing the same difference, and a check that compares a node voltage against another tool’s node voltage is comparing two conventions as much as two answers.
Where the schematic’s ground symbol comes into it
A schematic’s ground symbols look like a statement about the circuit and are usually two statements with nothing to do with each other, which is worth separating before the next section.
One of them is the netlist’s reference: the node whose potential the solve calls zero. That is the subject of this essay and it is a convention.
The other is a connection. Several ground symbols on one drawing mean those nodes are joined together, and that is a fact about the circuit — it changes the topology, and removing it changes every answer. The symbol carries both meanings at once because on most schematics they coincide: the nodes that are joined are also the ones called zero.
They come apart the moment a circuit has more than one return. A board with an analogue return and a power return joined at a single point has two sets of ground symbols that are connected and are two different nodes as far as any solve is concerned, and the millivolts between them are the whole subject of the millivolts in the wire. Calling one of them zero is still a convention; joining them is not.
That is the practical reason the distinction in this essay is worth having. A reader who takes “ground” to be one idea will read a solve’s node voltages as potentials relative to something physical, and will be surprised when a return conductor turns out to have volts across it. The solve was never claiming otherwise: it reported differences, and one of the nodes it measured them from was chosen by whoever typed the netlist.
The unknowns the method adds
There is a second thing the netlist has and the circuit does not, and it is worth naming here because it is the “modified” in modified nodal analysis.
Plain nodal analysis has one unknown per node and one equation per node, and every element contributes a conductance. An ideal voltage source has no conductance — it is a constraint, not an admittance — so it cannot be written that way, and the modification is to add its current as an extra unknown and its constraint as an extra equation. The same is done for inductors and for controlled sources whose output is a voltage.
That has two consequences a reader of a matrix should know. The matrix is larger than the number of nodes, by the number of such elements. And it is no longer symmetric and positive definite: the extra rows and columns have zeros on the diagonal, so the elimination cannot be done without pivoting and a solver that assumes it can will divide by zero on the first voltage source it meets.
Neither of those is a choice in the way the reference is. They are consequences of wanting ideal sources, and the alternative — giving every source a small series resistance so that everything is a conductance — is the thing this site’s solver refuses by name, because stamping a milliohm where a constraint belongs puts a 10³ beside a 10⁻³ in the same matrix and buys nothing.
The choice that cannot repair anything
The last figure is the other side of the invariance, and it settles what a reference is not.
A network with a floating subnetwork — two nodes joined to each other and to nothing else — is refused from every one of its five possible references. The refusal is the same each time and it names the defect rather than the symptom: a floating subnetwork, not a singular matrix.
That is the right behaviour and it is the point. If the reference were a free parameter that could rescue an ill-posed problem, the choice would be part of the method’s substance rather than a convention. It is not. A circuit that does not determine its own potentials is not made to determine them by relabelling one of its nodes, and a solver that hunted through references looking for one that worked would be hunting for an arithmetic accident.
The answer that is perfect and absurd makes the companion point about a network that is solvable and meaningless. Here is a network that is unsolvable from every angle, and it is worth having both: the boundary between the two is a property of the circuit, and the reference is on neither side of it.
A short chain, for scale
The conditioning result is worth reading once more at a size where the whole sweep fits on the page, because the pattern is easier to see than the numbers are to remember.
Six sections, eight references. The condition number is lowest at the third node in — near the middle — and rises in both directions, reaching three times its best at the far end. The branch voltage agrees to 8.6 × 10⁻¹⁴ at all eight.
That is the shape of the whole result: an inverted arch in the arithmetic, drawn over a flat line in the physics. It is also, read the other way, a small reassurance. The worst reference on an ordinary network costs half a digit of sixteen, so the convention everybody uses — the bottom rail, because that is where the schematic’s ground symbols are — is a perfectly good choice and is not a good choice because anybody checked.
What a second route would and would not catch
This site checks every answer twice, and it is worth asking what the second route says about the reference — because the answer is that it says less than it looks.
The second route in what a network answers is a residual: put the computed node voltages back into the network’s own element laws and confirm that the currents balance at every node. That check is done on the same set of node voltages the solve produced, in the same reference, so it cannot see a bad reference at all. A solve that lost four digits to a bad choice still satisfies its own residual to the last bit, because the residual is a statement about consistency rather than about accuracy.
The check that does see it is the one used here: solve the same system again with more precision. That is not a second route in the usual sense — it is the same route walked more carefully — and it is the only instrument in this collection that can distinguish “the answer is consistent” from “the answer is right”.
What a genuinely independent second route would have to do is compute the same branch quantity from a different set of unknowns. Mesh analysis is exactly that: its unknowns are loop currents, it has no reference node at all, and the branch quantity it produces should agree with nodal analysis’s to whatever both arithmetics can hold. Two methods with different unknowns, disagreeing about nothing except how many digits survive, would put a number on the reference’s cost that this essay measures only against a better version of itself.
Still open: the reference as a solver’s decision, a matrix that is not a chain, and the frequency
A solver that chooses. Everything here takes the reference from the netlist. A solver could choose it instead — by degree, by where the largest conductances meet, or by a proper ordering heuristic — and on the star that would have avoided the four digits. What such a rule should be, and whether any simple one beats “take the node with the most connections”, is a measurable question with a clean answer criterion: the condition number over a family of networks.
Networks that are not chains. The middle-is-best result is about a chain, where there is an obvious middle. On a mesh, a star or a network with several loops there is no such node and the condition number’s dependence on the reference has a different shape. Sweeping the reference over a randomly generated family and correlating the result with something cheap to compute — the node’s degree, the sum of the conductances meeting it — would say whether a rule exists at all.
And the same question at s = jω. Every measurement here is at direct current, where the matrix is real. At a frequency the matrix is complex and its conditioning moves with frequency, which where the matrix is worst, and where the answer is not measures for a fixed reference. Whether the best reference is the same at every frequency, or moves with the response’s own features, is the natural next measurement — and if it moves, a solver that chooses once for a whole sweep is choosing wrongly somewhere.
Part 2 on nodal analysis
One argument about Nodal analysis, and one of 2 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:
The objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
ConditioningKirchhoffs current lawModified nodal analysisNumerical errorSingular matrixVerification
- A sum that is exact, and the estimate that is not numerical error, verification
- Every derivative, and the one that is zero numerical error, verification
- The loop that never crosses numerical error, verification
- The number that was wrong numerical error, verification
- The optimum a spectrum moves numerical error, verification
- Two solves that add, and the one that does not modified nodal analysis, verification