Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 48 · Kirchhoff's Laws and Nodal Analysis

Mesh Analysis

Solve circuits with mesh analysis: assign clockwise loop currents, write KVL for each mesh, handle shared resistors, supermeshes and a three-mesh ladder.

Nodal analysis chooses voltages as its unknowns. Mesh analysis is its mirror image: it chooses currents. Imagine a circuit drawn on paper with several "windows". Give each window a circulating loop current, write Kirchhoff's voltage law around each window, and solve. A resistor shared by two windows simply sees the difference of the two loop currents.

Mesh analysis shines when a circuit has many voltage sources and few windows. Like nodal analysis, it always works for planar circuits (those that can be drawn without crossing wires).

A two-window circuit with a 12 volt source, a shared 4 kilohm resistor and a 6 volt source, with clockwise mesh currents.
One clockwise current per window; the shared resistor carries I1 − I2.

What you will learn

  • The steps of mesh analysis and why the clockwise convention is useful.
  • How to write the mesh equations quickly in matrix form R·i = v.
  • How to handle current sources with a supermesh.
  • How to solve a three-mesh ladder and check the answer.

Key terms

Mesh: a loop with no other loop inside it (a "window" of a planar circuit).

Mesh current: an imagined current circulating around one mesh.

Shared branch: an element on the border of two meshes; its real current is the difference of the mesh currents.

Supermesh: two meshes sharing a current source, analyzed together.

The method

  1. Identify the meshes and assign each a clockwise current I1, I2, … Always use the same direction (clockwise) so that shared-element signs are predictable.
  2. Write KVL around each mesh, walking in the direction of the mesh current. A resistor in mesh k contributes a drop I_k·R from its own mesh current; if it is shared with mesh j, it also contributes −I_j·R (the neighbor's current flows through it in the opposite direction in your walk).
  3. Collect into equations in the unknowns.
  4. Solve the linear system.
  5. Recover the branch currents (for shared elements, the difference) and voltages; check the power balance.

Worked example

The picture shows two meshes. Left mesh: 12 V source, R1 = 2 kΩ, and the shared R2 = 4 kΩ. Right mesh: the shared R2, R3 = 2 kΩ, and a 6 V source that opposes the clockwise current of mesh 2. Units: kΩ, mA, V.

Mesh 1 (clockwise): sources raise +12; drops: 2·I1 in R1, and 4·(I1 − I2) in R2.

12 − 2I1 − 4(I1 − I2) = 0, so 6I1 − 4I2 = 12.

Mesh 2: drops: 4·(I2 − I1) in R2 and 2·I2 in R3, and the 6 V source also drops 6 V in the direction of I2 (its + terminal is entered first).

−4(I2 − I1) − 2I2 − 6 = 0, which rearranges to −4I1 + 6I2 = −6.

Solve: from the first equation I1 = (12 + 4I2)/6. Substituting: −4(12 + 4I2)/6 + 6I2 = −6, so −8 − (8/3)I2 + 6I2 = −6, giving (10/3)I2 = 2 and I2 = 0.6 mA, I1 = 2.4 mA.

Recover and check. The shared resistor carries I1 − I2 = 1.8 mA, with 7.2 V across it. Power absorbed: R1 = 2 × 2.4² = 11.52 mW, R2 = 4 × 1.8² = 12.96 mW, R3 = 2 × 0.6² = 0.72 mW, and the 6 V source absorbs 6 × 0.6 = 3.6 mW (current enters its + terminal), a total of 28.8 mW. The 12 V source supplies 12 × 2.4 = 28.8 mW ✓.

Writing the equations by inspection

For circuits with only resistors and independent voltage sources, the system is

R · i = v

  • Diagonal entry R_kk: the sum of all resistances in mesh k.
  • Off-diagonal entry −R_kj: minus the sum of resistances shared by meshes k and j (with all meshes clockwise).
  • Right-hand side v_k: the sum of source voltage rises in mesh k in the direction of its current.

Check the worked example: R11 = 2 + 4 = 6, R22 = 4 + 2 = 6, R12 = R21 = −4, v = (12, −6). Exactly what we derived, and the matrix is symmetric (a good error check). This is the dual of nodal analysis: resistance matrix and voltage sources here, conductance matrix and current sources there.

Current sources: the supermesh

A current source in a branch that belongs to only one mesh simply sets that mesh current (to ± the source value), removing one unknown. If the source is shared between two meshes, its voltage is unknown, so:

  1. Draw a supermesh around both meshes, leaving out the branch with the source, and write one KVL equation around the outer loop.
  2. Add the constraint: the difference of the two mesh currents equals the source current (I1 − I2 = Is, with the sign set by the arrow).

Count again: two unknowns, two equations. The same idea that gave the supernode in nodal analysis.

A three-mesh ladder

For a ladder with a 10 V source, series R1 = 1 kΩ, shunt R2 = 2 kΩ, series R3 = 3 kΩ, shunt R4 = 4 kΩ and end resistor R5 = 5 kΩ in three meshes, the equations by inspection are

TEXT
( 3  -2   0 ) (I1)   (10)
(-2   9  -4 ) (I2) = ( 0)
( 0  -4   9 ) (I3)   ( 0)

You would not want to solve that by hand every day, which is exactly what the program below does. Reduction gives a check: R4 ‖ R5 = 2.222 kΩ, plus R3 gives 5.222 kΩ, in parallel with R2 gives 1.446 kΩ, plus R1 gives Req = 2.446 kΩ, so I1 = 10 / 2.446 = 4.09 mA.

Nodal or mesh?

For the two-window circuit of this lesson there are two mesh equations but only one non-reference node unknown (the node between the three resistors): nodal needs one equation, 5V_N = 36, so V_N = 7.2 V, matching the shared-resistor voltage. Count unknowns before you choose.

Common misconceptions

"A mesh current is a real current in every element." It is a mathematical loop current. Only elements in a single mesh carry exactly that current; shared elements carry the difference.

"I can choose any direction for each mesh current." You can, but using clockwise for all keeps every off-diagonal term negative and the matrix symmetric.

"Mesh analysis works on any circuit." It requires a planar circuit; a circuit with crossing wires that cannot be redrawn flat needs nodal analysis.

"A current source in a mesh just adds a voltage term." Its voltage is unknown, so it fixes a current (or needs a supermesh) instead.

Try it

This program solves the two-mesh example, recovers every branch current, and checks that the supplied power equals the absorbed power.

Python Two-mesh solver with power balance

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Now the three-mesh ladder, checked against series-parallel reduction. Change any resistor and both answers should move together.

Python Three-mesh ladder versus reduction

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. Two meshes share a 4 kΩ resistor. Mesh currents (both clockwise) are I1 = 2.4 mA and I2 = 0.6 mA. The current in the shared resistor is

    The shared resistor carries I1 − I2 = 1.8 mA.
  2. 2. In the matrix R·i = v for clockwise mesh currents, the diagonal entry for mesh k is

    R_kk is the total resistance around mesh k; the off-diagonals hold the shared resistances with a minus sign.
  3. 3. A current source is shared by two meshes. You should

    Its voltage is unknown, so write KVL around the supermesh and use I1 − I2 = Is.
  4. 4. Mesh analysis requires the circuit to be

    Meshes are the windows of a planar circuit.
  5. 5. For the worked example the 6 V source absorbs

    6 V × 0.6 mA = 3.6 mW; current enters its + terminal, so it absorbs.

Summary

  • Mesh analysis assigns a clockwise current to each window and writes KVL around each.
  • Matrix form R·i = v: diagonal = total resistance in the mesh; off-diagonal = −shared resistance; v = source rises.
  • Shared elements carry the difference of the mesh currents.
  • A current source shared by two meshes needs a supermesh plus a constraint; a current source in one mesh fixes that current.
  • Compare unknown counts: choose mesh or nodal, whichever gives fewer equations.

Next: Chapter 4 Review