Mesh Analysis
Mesh Analysis: Solve Electrical Circuits Systematically
Mesh analysis is a circuit-solving method used to calculate currents and voltages in planar electrical networks. Instead of writing a separate equation for every branch current, you assign a current to each independent mesh (the smallest closed loop in a planar circuit), apply Kirchhoff's Voltage Law (KVL), and solve the resulting simultaneous equations. The method is particularly convenient when a circuit has several voltage sources and resistors arranged in loops.
Mesh analysis is based on two core ideas: current is conserved at nodes, and the algebraic sum of voltage changes around a closed loop is zero. The method uses assumed current directions, so you do not need to know the actual direction before starting. If a solved current is negative, the real direction is opposite to the reference direction you chose.
This guide explains how to identify meshes, handle shared resistors and current sources, construct equations, solve examples, and check results. It focuses on linear DC resistor networks first, then explains how the same approach extends to AC impedance circuits. Correct sign conventions are more important than memorizing a particular equation pattern.
1. Meshes, loops, and mesh currents
A loop is any closed path through a circuit. A mesh is a loop that contains no other loop inside it in a planar circuit diagram. Every mesh is a loop, but a larger loop formed by combining smaller loops is not itself a mesh.
Assign a current variable to each mesh, often clockwise for consistency. These mesh currents are mathematical variables, not necessarily the physical current through every branch. A resistor that belongs to one mesh carries that mesh current; a resistor shared by two meshes carries the algebraic difference between the two mesh currents.
For example, if two clockwise mesh currents (I_1) and (I_2) pass through a shared resistor, their directions through that common branch are opposite. The branch current in the direction of (I_1) is (I_1-I_2). The voltage drop, following mesh 1's direction, is therefore (R(I_1-I_2)). For mesh 2, the same resistor's drop is (R(I_2-I_1)).
This difference is the key to writing correct equations. Do not treat a shared resistor as carrying the sum of mesh currents unless the reference directions through that branch actually point the same way.
2. Write KVL with a consistent sign convention
Kirchhoff's Voltage Law states that the algebraic sum of voltage rises and drops around a closed loop is zero. Choose a direction around each mesh and follow it consistently. When traversing a resistor in the assumed current direction, write a voltage drop of (+RI) if you are summing drops. When traversing a source from its negative terminal to its positive terminal, you encounter a voltage rise; the sign depends on whether your equation sums rises or drops.
Either convention works as long as it is applied consistently. A common method is to sum resistor voltage drops and source rises around each loop, then equate the totals. Another is to write the algebraic sum of all voltage changes as zero. Avoid mixing these conventions in the same equation.
For a simple loop with a 12 V source and a 4 Ω resistor, if the assumed clockwise current passes through the resistor in the direction of the voltage drop, the equation is (4I=12), so (I=3) A. If you choose the opposite current direction, the solution is (-3) A, which communicates the same physical result. A negative answer is not automatically an error; it often means the assumed direction was opposite to reality.
3. A two-mesh example
Consider two meshes sharing a 2 Ω resistor. Mesh 1 also has a 4 Ω resistor and a 10 V source; mesh 2 also has a 6 Ω resistor and no independent source. Assume both mesh currents are clockwise, and the 10 V source drives mesh 1 in the chosen direction.
For mesh 1, the 4 Ω resistor drop is (4I_1), and the shared resistor drop is (2(I_1-I_2)). The equation is (4I_1+2(I_1-I_2)=10), which simplifies to (6I_1-2I_2=10).
For mesh 2, the 6 Ω resistor drop is (6I_2), and the shared resistor drop in mesh 2's direction is (2(I_2-I_1)). Its equation is (6I_2+2(I_2-I_1)=0), or (-2I_1+8I_2=0).
Solve the simultaneous equations together. The second equation gives (I_2=I_1/4). Substituting into the first gives (6I_1-0.5I_1=10), so (I_1approx1.818) A and (I_2approx0.455) A. The current through the shared resistor in mesh 1's direction is (I_1-I_2approx1.364) A. Check the equations and component voltage drops before using the results.
4. Matrix form for larger circuits
For a network with several meshes, the equations can be organized into a matrix. For a resistor-only planar circuit, the diagonal coefficient for a mesh current is the sum of the resistances around that mesh. An off-diagonal coefficient is the negative sum of resistances shared by that mesh and the other mesh, when all mesh currents use the same rotational convention.
For three meshes, a typical first equation may look like ((R_1+R_{12}+R_{13})I_1-R_{12}I_2-R_{13}I_3=V_1). Here, (R_{12}) is the resistance shared by meshes 1 and 2, and (R_{13}) is shared by meshes 1 and 3. The source term (V_1) is the algebraic net source voltage in the chosen mesh direction.
The matrix pattern makes equations easier to audit and is suitable for hand calculation or numerical tools. However, the simple resistance-sum pattern assumes the relevant elements are linear impedances and that the mesh topology is defined correctly. Controlled sources, non-linear components, and special source constraints may require additional equations. Always derive at least one equation directly from KVL to verify the signs before constructing a large matrix.
5. Circuits with current sources
A current source directly constrains the current in its branch. If a current source belongs to only one mesh, the corresponding mesh current may be known immediately, with the sign determined by the chosen direction. If the source arrow aligns with the assumed mesh current, the value is positive; if it opposes it, the value is negative.
If an ideal current source lies on a branch shared by two meshes, you cannot write a normal voltage drop across that source without knowing its voltage. Instead, form a supermesh: combine the two adjacent meshes into one outer loop, skipping the current-source branch while writing KVL around the perimeter. Then add a constraint equation relating the mesh currents to the current source.
For example, if the current-source arrow in the shared branch points in the direction of mesh 1's branch current, the constraint might be (I_1-I_2=I_s), depending on the defined mesh directions. The sign must be derived from the actual arrow and reference currents rather than memorized. The supermesh KVL equation and the current-source constraint together provide the equations needed to solve the network.
6. AC mesh analysis using impedance
Mesh analysis also works for sinusoidal steady-state AC circuits. Replace resistances with complex impedances: a resistor has impedance (R), an ideal inductor has (j\omega L), and an ideal capacitor has (1/(j\omega C)), where (\omega=2\pi f). Voltage sources and mesh currents are represented as phasors, and KVL equations use complex arithmetic.
The same shared-element principle applies. If an impedance (Z) is shared by two meshes, its drop in mesh 1's direction is (Z(I_1-I_2)). Solving the equations produces complex phasor currents. Their magnitudes and angles describe the sinusoidal steady-state response under the chosen reference convention.
Be careful with RMS versus peak values and with phase angles. Use one convention consistently across all source phasors. Mesh analysis in phasor form describes linear steady-state sinusoidal behavior; it does not by itself describe startup transients, switching waveforms, or non-linear device behavior. For those cases, a time-domain analysis or simulation may be needed.
7. Recover branch currents and voltages
After solving the mesh equations, translate mesh currents into physical branch quantities. A branch belonging to only one mesh carries that mesh current in the chosen branch reference direction. A shared branch carries the algebraic difference of the adjacent mesh currents. If the resulting branch current is negative, its real direction is opposite to the reference direction.
Calculate resistor voltages using Ohm's law, (V=IR), with the current direction and voltage polarity kept consistent. For a resistor shared by meshes, calculate the voltage using the branch current, not by applying one mesh current alone. For example, a shared 2 Ω resistor with (I_1=1.818) A and (I_2=0.455) A has a branch current of about 1.363 A in mesh 1's direction and a voltage magnitude of about 2.73 V.
You can then calculate power using (P=I^2R) for a resistor and compare source power with total dissipated power. With a consistent passive sign convention, the source power delivered should balance the power absorbed in an ideal DC resistive network. A mismatch often reveals a sign error, a missed shared branch, or arithmetic mistakes.
8. Common mistakes and how to avoid them
Adding shared currents instead of subtracting them. With all mesh currents clockwise, adjacent meshes typically travel in opposite directions through their common branch. Write the branch current explicitly before simplifying.
Inconsistent source signs. Mark each source's positive and negative terminals and trace the chosen loop direction. Decide whether your equation sums drops or rises and use that convention throughout.
Confusing a loop with a mesh. Identify the smallest independent loops in a planar diagram. Larger combined loops are not additional independent mesh currents.
Ignoring a current-source constraint. A current source shared by meshes requires a supermesh equation plus a current relation. Do not invent a voltage across an ideal current source.
Assuming a negative current is impossible. Negative values simply indicate that the actual direction differs from the assumed reference direction.
Not checking the result. Substitute the solved currents back into the original equations, verify KVL around each loop, and check power balance where applicable.
Writing branch directions and polarities on the diagram before doing algebra is one of the most effective ways to reduce errors.
9. When mesh analysis is useful—and when it is not
Mesh analysis is especially efficient for planar circuits with relatively few meshes and several voltage sources. It directly gives loop currents and can make branch-current calculations straightforward. Nodal analysis may be more convenient when a circuit has fewer essential nodes than meshes, many current sources, or a common reference node that simplifies the equations.
The methods are not competing laws; both are systematic ways to apply Kirchhoff's laws. Choose the method that produces fewer unknowns and clearer equations. For a circuit that is not planar, ordinary mesh-current analysis may not apply directly because the network cannot be drawn without crossing branches. Nodal analysis or a more general network method is then often preferable.
Simulation can verify algebra, but it should not replace understanding the circuit. Build the equations first, solve them, and then compare with a circuit simulator using the same source polarities and component values. If the answers differ, check the model, ground reference, initial assumptions, and whether the simulation uses AC phasors or transient analysis.
10. A reliable step-by-step workflow
- Redraw the circuit clearly and identify every independent mesh.
- Assign a reference current to each mesh, using clockwise directions for convenience.
- Mark source polarities and write the direction of current through each branch.
- For each resistor, express its drop using the current actually flowing through that branch.
- Apply KVL to each mesh. For a shared resistor, use the difference between mesh currents when their branch directions oppose.
- If a current source is shared by two meshes, form a supermesh and write the current-source constraint.
- Solve the simultaneous equations and preserve signs and units.
- Calculate branch currents and voltages, then verify KVL and power balance.
Practice first with two-loop resistor circuits before adding current sources or AC impedances. In each exercise, explicitly write the current through a shared resistor before expanding the equation. This small habit makes the algebra much easier to audit.
Mesh analysis becomes dependable when it is treated as a disciplined application of KVL rather than a formula to memorize. Once the reference directions and signs are clear, even larger linear circuits can be expressed systematically and solved by hand or with a numerical tool.