Where You Put the Zero
Boundary conditions are grounding choices. Neumann, Dirichlet, Robin, and no-condition-at-all are four ways to answer one question about the free path Laplacian $L = B^\top\! B$ — which voltage is declared zero? — and the four inverses that result are four different matrices with four different meanings. The observables never change: $R_{\mathrm{eff}}(i,j) = \vert i-j\vert$, exactly, from every one of them.
Same matrix, different zero — and this page is the expansion of the green tents §4 into the full family it was hinting at.
Four boundary conditions, one table
Everything the page will do is in this table; the rest is the working-out. Each row is one way of pinning down the floating rod on $(0,1)$ — equivalently, one way of editing the $6\times6$ free path Laplacian $L$ with diagonal $\{1,2,2,2,2,1\}$ — and every cell is backed by a machine check in results/grounding.json or the exact-rational Wolfram companion.
| continuous BC | physical picture | discrete implementation | what the inverse represents | statistical reading | triangular rank |
|---|---|---|---|---|---|
| Neumann $u'(0)=u'(1)=0$ |
insulated ends — no flux; solvable only when $\int f = 0$, solution defined up to a constant | the free Laplacian $L$ itself — degree diagonal $\{1,2,2,2,2,1\}$, zero row sums, kernel = constants, rank 5 | no inverse exists; the pseudoinverse $L^{+}$ is the mean-zero gauge: voltages of balanced injections with $\sum v = 0$ | intrinsic (improper) GMRF restricted to $\mathbf 1^{\perp}$ — Rue–Held's IGMRF | 2 — exactly |
| Dirichlet, both ends $u(0)=u(1)=0$ |
walls as infinite baths — whatever arrives is swallowed at temperature zero | append wall nodes and delete them — equivalently corner entries $1\to2$: $\mathrm{tridiag}(-1,2,-1)$, the suite's $A$ | bridge covariance / tent Green functions: $\min(i,j)\,(7-\max(i,j))/7$ | condition the free field on the wall values — principal submatrix of precision | 1 |
| Dirichlet at one point $u(x_k)=0$ |
a reference electrode soldered to node $k$; the rest of the rod floats | GroundedInverse[L,k]: delete row/col $k$, invert, re-embed with a zero row/col | $k=1$: the integer Brownian-motion kernel $\min(i,j)-1$; interior $k$: two independent motion blocks run away from $k$ | condition the GMRF on $u_k=0$; interior $k$ is a Markov separator — the chain splits | 1 — for every $k$ |
| Robin $u'(0)=\kappa\,u(0)$ |
a leaky wall — the end grounded through a resistor $1/\kappa$ (a spring, a heat-leak) | bump one diagonal entry: $L + \kappa\,e_1e_1^{\top}$ — partial grounding | $\min(i,j)-1+1/\kappa$: the grounded inverse plus a uniform offset $1/\kappa$; interpolates Neumann ($\kappa\to0$) to Dirichlet ($\kappa\to\infty$) | a Gaussian pseudo-observation of $u_1$ with precision $\kappa$ | 1 — for every $\kappa>0$ |
Two of those rank entries are the findings this page exists to explain: TriangularRankOneQ[GroundedInverse[L,1]] is True, and PseudoInverse[L] only passes the rank-2 test — verified in exact rational arithmetic, corner-rank certificates $[0,1,1,1,1,1]$ and $[1,2,2,2,2,1]$. By §6 both will be one theorem plus one gauge identity.
Four ways to end a rod
The equation is always $-u'' = f$ on $(0,1)$; the operator does not know what happens at the ends. A second-order ODE needs one condition per endpoint, and the choice is physical, not mathematical bookkeeping:
Neumann has a solvability tax. Integrate $-u''=f$ across the rod: the left side telescopes to the net flux through the ends, which insulation forces to zero. So a steady state exists only when $\int_0^1 f = 0$ — you cannot pump one watt into a perfectly insulated rod and call it steady — and when a solution exists, $u + c$ is another. The discrete mirror is exact: $Lx = e_1$ (a lone unit source) is inconsistent, with least-squares residual $1/\sqrt6$ — precisely the constant component of $e_1$ — while $Lx = e_1 - e_2$ (a balanced source–sink pair) solves fine, and adding a constant to $x$ still solves it, to $8.9\times10^{-16}$.
And every ending builds its Green's function the same way. The Sturm–Liouville recipe: take one fundamental solution $u$ of the homogeneous equation satisfying the left boundary condition, one solution $v$ satisfying the right, and glue them at the source: $$G(s,t) \;=\; \frac{u(\min(s,t))\;v(\max(s,t))}{W},$$ with $W$ the (constant) Wronskian. For $-u''=0$ the fundamental solutions are affine — lines — which is why every Green's function on this page is built from ramps. The bridge takes $u = x$ (vanishes at the left wall) and $v = 1-x$ (vanishes at the right); the one-electrode kernel takes a ramp and a constant (the free end wants zero slope); Robin takes a ramp whose intercept remembers $\kappa$. Hold on to the phrase "one fundamental solution per side" — in §6 it becomes a rank count.
How each boundary condition edits the matrix
The protagonist of this page is twelve lines of Mathematica. The construction is Vishnoi's: orient the path's five edges, stack the signed incidence rows, and square up —
$L$ is the free Laplacian: row sums zero, kernel exactly the constants, rank 5. Its degree-1 corners are the insulation — the green tents §4 told that story entrywise, and this page begins where that one stopped. From here, each boundary condition is a small, literal edit:
| edit to $L$ | resulting operator | boundary condition | electrical reading |
|---|---|---|---|
| none — keep the singularity | $L$, rank 5 | Neumann at both ends | no path to ground anywhere; only voltage differences mean anything |
| append walls, then delete them — equivalently corners $1\to2$ | $L + e_1e_1^{\top} + e_6e_6^{\top} = \mathrm{tridiag}(-1,2,-1)$ — the suite's laplacian_1d(6), verified as the $8$-path Laplacian minus its wall rows/cols | Dirichlet at both ends | two wires to ground; the end rows leak |
| delete row/col $k$, invert, re-embed | GroundedInverse[L,k] | Dirichlet at the single point $x_k$ | reference electrode soldered to node $k$: $v_k \equiv 0$ by decree |
| bump one diagonal entry by $\kappa$ | $L + \kappa\,e_1e_1^{\top}$ | Robin at the left end | node 1 grounded through resistance $1/\kappa$ — partial grounding |
| none — but fix the gauge | $L^{+}$, the Moore–Penrose pseudoinverse | Neumann plus the convention "ground the average" | voltages of balanced injections, reported with $\sum v=0$ |
The statistical column of §1's table is the same list read by a different community. Deleting row and column $k$ of a precision matrix is exactly conditioning the Gaussian field on $u_k = 0$ — that is the whole rule, and it is why grounding and conditioning are one operation. Keeping $L$ un-edited leaves an improper prior — Rue and Held's intrinsic GMRF, a density that only integrates on the complement of the constants — and adding $\kappa\,e_1e_1^{\top}$ is precisely what a Gaussian likelihood term ("I observed $u_1 \approx 0$ with precision $\kappa$") does to a posterior precision. Boundary conditions, reference electrodes, and priors-versus-observations are three dialects for the five rows of the table above.
The grounding explorer
One chain, four zeros. Pick the boundary condition; the heatmap is the full $32\times32$ inverse (computed in-page from the closed forms the checks scripts verified, and re-checked at load against baked columns of results/grounding.json — badge). The right panel is one column of the inverse — a Green's function — and morphs between tent, ramp, split, offset ramp, and centered tent as you change where the zero lives. The $n=6$ table underneath is the same mode in exact arithmetic.
Five inverses at n = 6, in exact integers and rationals
Small enough to read entry by entry, and every matrix below is quoted verbatim from the exact-arithmetic checks. Watch two things: where the zero row/column sits, and which two ramps multiply to give the upper triangle.
Ground node 1 — Brownian motion
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 2 | 2 | 2 | 2 |
| 0 | 1 | 2 | 3 | 3 | 3 |
| 0 | 1 | 2 | 3 | 4 | 4 |
| 0 | 1 | 2 | 3 | 4 | 5 |
Ground both walls — Brownian bridge
| 6/7 | 5/7 | 4/7 | 3/7 | 2/7 | 1/7 |
| 5/7 | 10/7 | 8/7 | 6/7 | 4/7 | 2/7 |
| 4/7 | 8/7 | 12/7 | 9/7 | 6/7 | 3/7 |
| 3/7 | 6/7 | 9/7 | 12/7 | 8/7 | 4/7 |
| 2/7 | 4/7 | 6/7 | 8/7 | 10/7 | 5/7 |
| 1/7 | 2/7 | 3/7 | 4/7 | 5/7 | 6/7 |
Ground node 3 — the chain splits
| 2 | 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 0 | 1 | 2 | 2 |
| 0 | 0 | 0 | 1 | 2 | 3 |
Robin κ = 1 — ground through a resistor
| 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 2 | 2 | 2 | 2 | 2 |
| 1 | 2 | 3 | 3 | 3 | 3 |
| 1 | 2 | 3 | 4 | 4 | 4 |
| 1 | 2 | 3 | 4 | 5 | 5 |
| 1 | 2 | 3 | 4 | 5 | 6 |
No ground at all — the pseudoinverse
| 55/36 | 25/36 | 1/36 | −17/36 | −29/36 | −35/36 |
| 25/36 | 31/36 | 7/36 | −11/36 | −23/36 | −29/36 |
| 1/36 | 7/36 | 19/36 | 1/36 | −11/36 | −17/36 |
| −17/36 | −11/36 | 1/36 | 19/36 | 7/36 | 1/36 |
| −29/36 | −23/36 | −11/36 | 7/36 | 31/36 | 25/36 |
| −35/36 | −29/36 | −17/36 | 1/36 | 25/36 | 55/36 |
Line the five up and the green tents §4 pin-count table — 0 pins, 1 pin, 2 pins — has become a continuum: Robin's $\kappa$ slides from the unpinned pseudoinverse world ($\kappa\to0$, where the inverse blows up as $G_1 + \tfrac1\kappa\mathbf{11}^{\top}$ along the constants it can no longer kill) to the one-pin motion kernel ($\kappa\to\infty$, error exactly $1/\kappa$). A boundary condition is not a binary; it has a knob.
Why 1, and why 2: the predicate is a semiseparability certificate
Now the findings. TriangularRankQ walks $j$ from 1 to $n$ and asks for the rank of every aligned corner block $m[\![1..j,\; j..n]\!]$ — rows from the top, columns to the right, hinged on the diagonal at $(j,j)$:
Rank 1 is a theorem, not a coincidence. Gantmacher and Krein (1941): the inverse of any irreducible symmetric positive-definite tridiagonal matrix is a single-pair matrix (a Green matrix) — there exist vectors $u, v$ with $$\big(T^{-1}\big)_{ij} \;=\; u_{\min(i,j)}\;v_{\max(i,j)},$$ so every corner block lies inside a single outer product. The suite re-checked it on 20 random irreducible SPD tridiagonals at $n = 6$ and $32$: SVD triangular rank 1, every time. And the continuous mirror is §2's Sturm–Liouville formula $G = u(\min)v(\max)/W$ read literally: $u$ is the left boundary condition, $v$ is the right one, and the triangular rank counts fundamental solutions per side. One per side — rank one. The factor pairs are sitting in the §5 tables: motion $u_i = i-1,\ v_j = 1$ (a ramp against the pin, a constant for the free end); bridge $u_i = i,\ v_j = (7-j)/7$ (two ramps, one per wall); Robin $u_i = i-1+1/\kappa,\ v_j = 1$ (the intercept remembers the resistor); interior grounding, one pair per block. All recovered exactly, and numerically re-extracted to $2.2\times10^{-16}$.
So why is the pseudoinverse rank 2? Because $L^{+}$ is not the inverse of any irreducible SPD tridiagonal — no grounding produced it. What it is instead is the star equation of this page:
Ground anywhere, then double-center, and you always land on the same matrix: all six centered groundings are bit-identical in exact rational arithmetic, the common matrix satisfies all four Moore–Penrose axioms exactly — hence is $L^{+}$ — and NumPy's pinv agrees to $1.8\times10^{-15}$. The centering $C$ is the "ground the average" instruction, and it is precisely what costs the extra rank: on the upper triangle, $$L^{+} \;=\; u^{(1)}v^{(1)\top} + u^{(2)}v^{(2)\top}$$ with the two pairs quoted under the §5 table — a motion pair (ramp times constant: the $G_k$ inheritance) plus a centering pair (constant times row-mean: the average being subtracted). One fundamental solution per side, plus one gauge correction: rank $1+1$, and the certificate $[1,2,2,2,2,1]$ says the bound is attained — $\mathrm{TriangularRankQ}[L^{+},1]$ is False, with rank-2 corner blocks at $j = 2,3,4,5$. The user's two findings are one theorem plus one gauge identity.
Ground anywhere — the physics does not move
If four different inverses all describe the same rod, what did the choice of zero actually change? Labels, not physics. Fix a balanced experiment — inject one ampere at node $i$, draw it out at node $j$ — and solve with any grounding you like. The individual voltages $v_i, v_j$ depend on where the electrode sits (they must: the electrode defines "zero volts"). The difference does not, and $$R_{\mathrm{eff}}(i,j) \;=\; G_{ii} + G_{jj} - 2G_{ij} \;=\; \vert i - j\vert$$ comes out exactly — the same $6\times6$ integer matrix of pairwise resistances from all six groundings and from the pseudoinverse, series unit resistors counted on your fingers, agreeing with mathematica/electrical_networks.wls ($R_{\mathrm{eff}}(1,6) = 5$). At $n=32$ the float check closes to $6.5\times10^{-13}$. The gauge identity of §6 is the reason: $G_k$ and $L^{+}$ differ only by rank-one pieces built from $\mathbf 1$, and $e_i - e_j$ annihilates them.
This is a gauge choice in the physicist's strict sense: a redundancy of description fixed by convention, with a dictionary of observables that do not care. Potentials are gauge; potential differences, effective resistances, and currents are physics. The suite has been quietly using this freedom all along — the dual-basis page's response matrix $X = B_{\mathrm{inc}}L^{+}$ is a gauge-fixed family of dipole fields (each row a balanced $e$-difference, so the choice of gauge cancels row by row), and report 10's improper prior is the statistician's same move: don't fight the flat direction, just report functionals orthogonal to it. Where you put the zero is a fact about your notebook. $\vert i-j\vert$ is a fact about the rod.
Where the suite has already touched this page
The seed — the green tents §4: free vs grounded, the degree diagonal as insulation, and the 0/1/2-pin table this page stretches into a $\kappa$-continuum.
The two-pin world — the bridge explainer and report 09: everything downstream of $\mathrm{tridiag}(-1,2,-1)$, including the rank-1 triangle read as bridge covariance.
The rank machinery — report 13 §3 (semiseparable, Gantmacher–Krein) and report 14 (separator rank; this page's corner certificate equals its off-diagonal block rank on the chain).
The gauge users — the dual-basis page ($X = B_{\mathrm{inc}}L^{+}$, dipoles immune to grounding) and mathematica/electrical_networks.wls (effective resistance, the projection $\Pi$, Vishnoi's conventions — including the $B$ sign this page's $L=B^\top\!B$ inherits).
The statistics — report 09 (precision = stiffness; conditioning = principal submatrix) and report 10 (proper vs improper priors: the pseudoinverse as the covariance the intrinsic field almost has).