Set up
Nodal analysis solves a circuit by finding a few node voltages. Everything else follows from them. Our circuit has a 12 V source, a 1 mA current source and four resistors. Its wires make four nodes.
First, choose one node as the reference and call it 0 V. Every other node voltage is measured from it. We pick the bottom wire: it touches the most parts. The ground symbol marks it.
Next, name every other node. The top-left node is held at 12 V by the source, so it is already known. That leaves two unknowns: v1 at node 1 and v2 at node 2. Two unknowns need two equations.
Write the equations
Every resistor current can be written with node voltages. The current through R3 from node 1 to node 2 is (v1 − v2)/R3: the voltage at the start minus the voltage at the end, over the resistance.
Now apply KCL at node 1: the currents leaving add to zero. (v1 − 12)/2k + v1/8k + (v1 − v2)/2k = 0. Multiply every term by 8 kΩ to clear the fractions: 9v1 − 4v2 = 48.
Then KCL at node 2. Currents leave through R3 and R4, and the current source pushes 1 mA in, so it counts as minus. (v2 − v1)/2k + v2/3k − 1 mA = 0. Times 6 kΩ: −3v1 + 5v2 = 6.
Write both equations as G·v = i. The diagonal of G holds the total conductance at each node. The other entries hold minus the conductance joining the two nodes. The right side holds the source currents pushed in.
Solve and check
Solve the pair with Cramer's rule. The determinant is 9·5 − 4·3 = 33. Then v1 = 264/33 = 8 V and v2 = 198/33 = 6 V. These two numbers fix every voltage in the circuit.
With the node voltages known, Ohm's law gives each current. i1 = (12 − 8)/2k = 2 mA, i2 = 8/8k = 1 mA, i3 = (8 − 6)/2k = 1 mA, i4 = 6/3k = 2 mA.
Always check. At node 2, 1 mA arrives through R3 and 1 mA from the source, and 2 mA leaves through R4: 1 + 1 = 2. Power balances too: the sources supply 30 mW and the resistors absorb 30 mW.
Turn Is from 0 to 4 mA. Only the right side of G·v = i changes, so v1 and v2 move along straight lines. Above 3.2 mA, v2 is higher than v1, and the current in R3 reverses.
What is happening
# step 1/11 · goal
# about: Node 1, Node 2, Reference (0 V)
node a point where two or more elements meet
(all wire joined to it is one node)
nodes here
top left between the source and R1
node 1 R1, R2 and R3 meet
node 2 R3, R4 and the current source
bottom the long bottom wire
nodal analysis: KCL at each unknown node,
every current written with node voltages.
The figure is an ideal DC circuit: a 12 V source, a 1 mA current source, 2, 8, 2 and 3 kΩ resistors and wires with no resistance. Every voltage, current and power shown is computed from these values by the lesson's model. Currents leaving a node are counted as positive in every KCL equation here. Any consistent rule works; mixing rules inside one equation does not.