Build the conductance matrix as an energy Hessian
Orient each of the \(m\) connections of a connected graph and form an incidence matrix \(B\) with one row per edge, containing \(+1\) at its upstream node and \(-1\) at its downstream node. For node voltages \(v\), differences \(Bv\) determine currents \(i_e=g_e(Bv)_e\) in edges of conductance \(g_e>0\). Conservation at nodes reads \(B^Ti=b\), where externally injected currents \(b\) are positive into the network. Eliminating edge currents yields \(Lv=b,\ L=B^TGB\) with \(G=\operatorname{diag}(g_e)\). Reversing an edge changes a row of \(B\) and its current sign together; \(L\) and physical voltage predictions are invariant.
The identity \(v^TLv=\sum_e g_e(v_i-v_j)^2\ge0\) gives the nullspace directly. Equality forces equal voltage along each edge and hence constant voltage on a connected graph. Thus \(\ker L=\operatorname{span}\{\mathbf1\}\) and its range is \(\mathbf1^\perp\). A solution exists exactly when total injection is zero. On a graph with disconnected components the current sum must vanish separately on each component; one global cancellation can hide two incompatible islands. This is a compatibility condition on the physical data, distinct from the gauge freedom that persists for already compatible data.
Compare grounding, projection and a bordered solve
If \(b\) is compatible, choosing one node potential as zero removes one variable and one redundant conservation equation. The remaining principal submatrix is positive definite because a zero-energy vector extending with zero at the reference must vanish everywhere. An alternative chooses mean-zero voltage without favouring one node. Introduce a Lagrange multiplier \(\lambda\) and solve
The last equation fixes the gauge. Multiplying the first block by \(\mathbf1^T\) gives
For consistent data \(\lambda=0\), so the bordered solution satisfies the original equations exactly and is the Moore–Penrose minimum-norm solution. For inconsistent data the solver effectively removes a uniform current \(\lambda\) from every node. This may be sensible as a least-squares projection under an explicitly chosen equal-error model, but it is not the same physical network as a returning current concentrated at an actual external lead. Retain and interpret the multiplier.
Another formulation works directly in the zero-mean subspace with projector \(P=I-\mathbf1\mathbf1^T/n\). Iterative methods can project the right side and reproject iterates to remove accumulated constant drift. A preconditioner must preserve the intended subspace or be followed by the appropriate projection. The gauge-invariant observable \(v_i-v_j\) is always preferable for comparing solvers with different references. Comparing raw voltages node by node can report a large error between mathematically equivalent physical solutions. A separate edge-current balance and dissipated power check validate more than one reference-dependent vector residual.
Verify a triangle by current conservation and work
Connect nodes 1–2 and 2–3 with 1 S each, and 1–3 with 0.5 S. Inject 1 A at node 1 and remove it at node 3. The direct branch has 2 Ω and the two-edge indirect branch also totals 2 Ω, so 0.5 A flows along each path. The terminal difference is 1 V. Taking \(v_3=0\) gives \(v=(1,0.5,0)\) V, while subtracting their mean yields \((0.5,0,-0.5)\) V. Both produce Joule power \(2(0.5^2/1)+(0.5^2/0.5)=1\) W. The terminal injection work is \(b^Tv=1\) W in either gauge because the sum of \(b\) vanishes.
A guard against concealed modelling error is to solve first with all conservation rows, reporting the incompatible component of \(b\); only then introduce the intended reference. If measured injected currents are \(1.00,0,-0.97\) A and node 3 is grounded by deleting its equation, the computed branch currents imply that node 3 actually returns 1.00 A. The measured 0.03 A mismatch is thereby absorbed entirely by the chosen reference. The bordered projection instead distributes 0.01 A equally among the nodes. A calibrated return-lead model or a covariance-weighted correction can choose between such interpretations. A small residual after row deletion alone cannot tell whether the three measured currents were physically consistent.
What changes when a floating voltmeter is re-zeroed?
Connect three nodes by a triangle. The 1–3 and 2–3 conductances are each 1 S. Inject the selected current at node 1 and remove it at node 3. The graph sweeps a common reference-voltage shift. Use the oriented drop across branch 1–2 to predict its current, then compare the total injected power with the displayed dissipation.
The downloadable OneSimulation circuit solves the three resistors and current source twice, choosing a different reference node. The two absolute voltage reports change. Their branch drops must agree.
Tutorial · audit gauges, disconnected graphs and sensitivities
Find an effective resistance without choosing a reference
For connected \(L\), point injection pair \(b=I(e_a-e_b)\) and minimum-norm inverse \(L^+\), derive the effective resistance and verify its sign.
Work through the solution
The gauge-fixed solution is \(v=L^+b\), so terminal voltage divided by \(I\) is \(R=(e_a-e_b)^TL^+(e_a-e_b)\). Positive definiteness on the zero-sum subspace gives nonnegative \(R\), strictly positive for distinct connected nodes. In the example it is 1 Ω, independently confirmed by the parallel branches. Summing injected power \(I^2R\) matches edge dissipation.
Determine how much one connection is worth
What is the first derivative of the triangle's effective resistance with respect to the direct conductance? Compare a prediction for raising it by 0.01 S with a direct circuit reduction.
Work through the solution
For unit injection, differentiating \(Lv=b\) on the fixed gauge subspace gives
A single conductance change has \(dL=(e_i-e_j)(e_i-e_j)^Tdg\), so
The direct drop is 1 V per ampere, giving \(-1\) in compatible units. Prediction is \(R\simeq0.990\) Ω; exact parallel conductance becomes 1.01 S, so \(R=0.99010\) Ω. A positive conductance increment cannot increase effective resistance here.
Diagnose an island and an unobservable offset
Remove every link between two internally connected components carrying net injections \(+0.10,-0.10\) A. Is one ground constraint enough? What if both component sums are corrected to zero?
Work through the solution
The disconnected graph has two independent constant null vectors, one per component. Although the total current is zero, both component compatibility tests fail. No voltage gauge can make the missing inter-island return path appear. If both sums become zero, two independent gauge constraints still remain necessary for unique node voltages. Potential differences within either component are uniquely determined; differences across the two floating components remain arbitrary unless a physical reference or coupling is introduced.