Main content

### Course: Electrical engineering > Unit 2

Lesson 3: DC circuit analysis- Circuit analysis overview
- Kirchhoff's current law
- Kirchhoff's voltage law
- Kirchhoff's laws
- Labeling voltages
- Application of the fundamental laws (setup)
- Application of the fundamental laws (solve)
- Application of the fundamental laws
- Node voltage method (steps 1 to 4)
- Node voltage method (step 5)
- Node voltage method
- Mesh current method (steps 1 to 3)
- Mesh current method (step 4)
- Mesh current method
- Loop current method
- Number of required equations
- Linearity
- Superposition

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Number of required equations

We answer the questions, "How many equations are needed to solve a circuit, and where to they come from?" Written by Willy McAllister.

## Introduction

"Solving a circuit" means solving a system of simultaneous equations.

- How do we know the number of equations required to solve a circuit?
- How do we know we can create them?

As you study circuit analysis, it may seem like luck or coincidence that you get the right number of equations to solve. This article will show that luck is not involved, that the analysis methods reliably capture all of the constraints needed to solve the circuit.

### What we're building to

To solve a circuit, we want to know the voltage and current for each element. This means we need twice as many independent equations as there are elements in the circuit.

These equations come from three places:

- You get half of the equations from the element laws for each component.
- Kirchhoff's Current Law contributes
independent equations, where$N-1$ is the number of nodes.$N$ - Kirchhoff's Voltage Law contributes
independent equations, where$E-(N-1)$ is the number of elements.$E$

If you put these together, you end up with the right number of equations.

The results we develop here are baked into the different circuit analysis methods:

- Direct application of the fundamental laws (Ohm's Law and Kirchhoff's Laws)
- Node Voltage Method
- Mesh Current Method and its close relative, the Loop Current Method

It is okay to jump straight to the methods themselves and return here later.

## How many independent equations are needed to solve a circuit?

This is the key question that determines the amount of effort required to complete circuit analysis. I'm going to show you how the equations come from two places: the circuit elements, and how the elements are connected to each other.

The three constraints placed on currents and voltages in a circuit are:

-$i$ element laws$v$ - Kirchhoff's Current Law
- Kirchhoff's Voltage Law

The system of equations you write captures these constraints.

As we discuss this in abstract terms, we will also use a concrete circuit example.

As we learned when solving simultaneous equations in algebra, the number of independent equations you need to solve a system is equal to the number of unknown variables. So if you have a system with $10$ unknowns, you need $10$ equations to solve for the $10$ unknowns. How many unknowns does a circuit have? Every two-terminal element contributes an unknown voltage and unknown current. So $E$ elements contribute $2E$ unknowns. Therefore:

Solving a circuit withelements requires a system of $E$ independent equations. $\phantom{\rule{0.167em}{0ex}}}2E$

### Concept check

See if you can answer these questions about our example circuit.

## Where do the $2E$ equations come from?

Answer: Half of the equations come from the individual elements. The other half come from KCL and KVL.

### Half of the equations come from element laws

Imagine unconnected circuit components scattered about on the tabletop.

Each element has unknown current and voltage:

Each element brings with it one $i$ -$v$ equation. I like to think of circuit elements as little chunks of math.

These $i$ -$v$ relations represent $E$ independent equations, half of the required total.

### Where do the remaining $E$ equations come from?

The remaining $E$ equations come from the constraints implied by the circuit. Circuit connections link together and constrain the voltages and currents of individual elements. We can develop $E$ connectivity equations using Kirchhoff's Current Law (KCL) and Kirchhoff's Voltage Law (KVL).

Let's say a circuit has $E$ elements and $N$ nodes.

Our example circuit has $E=5$ elements (branches) and $N=3$ nodes. We also know the circuit has $6$ loops, $3$ of which are meshes.

Having $3$ nodes and $6$ loops is a lot of possibilities for coming up with $E=5$ more equations, but we have to be careful. The equations we generate have to be independent of each other.

### What is an *independent* equation?

An equation is

*linearly independent*if it*cannot*be derived from linear combinations of the other equations in the system.*Linear combinations*are any sequence of adding, subtracting, and multiplying by a constant. You use these operations to combine equations as you try to derive the remaining equation.### How many independent equations come from KCL?

We can write KCL equations at every node in the circuit, generating $N$ equations. BUT all $N$ KCL equations are

*not*independent. One equation is redundant. It is always possible to derived any one of the KCL equations from all the others. There is always one*dependent*equation that does not contribute any new information, so it is not needed.We only get to write $N-1$ independent equations using KCL. The node we leave out is a choice we get to make. Usually, we leave out the ground node because it is the most complex (has the greatest number of connections).

Summary: KCL contributes $N-1$ independent equations.

This leaves $E-(N-1)$ equations to go.

### How many independent equations come from KVL?

After writing $N-1$ equations using KCL, we still need to come up with $E-(N-1)$ more. In our example circuit, we need to come up with $5-(3-1)=3$ more equations. Where will they come from? They arise from using KVL around the loops of the circuit.

Graph theory tells us two wonderful things:

- KVL produces exactly the right number of independent equations,
.$E-(N-1)$ is the same as the number of meshes.$E-(N-1)$

So an easy way to know the required number of KVL equations is to count the meshes.

Our example circuit has $3$ meshes, so we know immediately we need to write $3$ KVL equations; no more, no less. Our circuit has $6$ loops (including the $3$ meshes), so there are plenty of possibilities to come up with the equations we need.

### Making sure the KVL equations are independent

We want the KVL equations to be independent. How do we do that?

Simplest: If we limit ourselves to writing KVL equations for just the meshes:

The meshes are guaranteed to produce independent equations.

If we want to (or have to) include equations for non-mesh loops, it takes a bit more care to be sure they are independent. One way to be sure a loop is independent is to:

Make sure every loop includes one element not in any other loop.

For our example circuit, we need to come up with $3$ independent KVL equations, selecting from the $6$ available loops. Let's take a look at the loop diagram:

If we pick the three meshes, ${\text{I}}$ , ${\text{II}}$ , and ${\text{III}}$ , we win! The meshes produce the right number of equations, and they are guaranteed to be independent. This is really handy, since it is easy to identify meshes. This is the basis of the Mesh Current Method.

Another valid set of loops from our example circuit would be loops ${\text{IV}}$ , ${\text{V}}$ , and ${\text{VI}}$ . Why might this be a good set?

- There are
equations, as required by$3$ .$E-(N-1)=3$ - Every element is included in a loop.

Some loop sets do not meet the guidelines:

**Can you tell why?** ,${\text{I}}$ , and${\text{V}}$ ${\text{VI}}{\textstyle \phantom{\rule{1em}{0ex}}}$ and${\text{IV}}$ ${\text{V}}{\textstyle \phantom{\rule{1em}{0ex}}}$ ,${\text{I}}$ ,${\text{II}}$ , and${\text{III}}$ ${\text{VI}}{\textstyle \phantom{\rule{1em}{0ex}}}$

Writing KVL equations for non-mesh loops takes a bit of extra care, but sometimes you may want to use a loop, or it is forced on you. Don't shy away from using loops, just be alert and thoughtful about it.

## Summary

There are three constraints placed on currents and voltages in a circuit:

-$i$ element laws$v$ - Kirchhoff's Current Law
- Kirchhoff's Voltage Law

The system of equations you write captures these constraints.

For a circuit with $E$ elements and $N$ nodes:

- You need:
independent equations to solve the circuit.$2E$

- You get:
equations from the element law for each component (Ohm's Law and the like).$E$ independent node equations using KCL.$N-1$ independent loop equations using KVL.$E-(N-1)$

is the same as the number of meshes, so an easy way to figure out the right number of KVL equations is to count the meshes.$E-(N-1)$ - Writing KVL equations on the meshes guarantees the right number of independent KVL equations.
- If you include non-mesh loops, if every loop has at least one element not in any other loop, it is guaranteed to be independent.

## Want to join the conversation?

- Why are IV, V, and VI a valid set in the last example? IV and V already contain every element, so VI doesn't have any element that isn't in another loop, which was stated to be a requirement?

Or is that not a requirement, but simply one way of generating independent equations with certainty?(15 votes)- You have a very sharp eye. This one puzzled me as I was writing the article. If you specify loops IV and V you do indeed have every element in the circuit represented in some equation. But! These two loops don't touch. It's like you have two independent circuits semi-tangled with each other. The loop currents don't have a relationship unless it is forced by the inclusion of another loop, say loop VI. This is a case where the E - (N - 1) rule saves us from writing too few equations.(20 votes)

- What do you mean by independent equations? what's the difference with a just equation?(4 votes)
- If you have two equations and you say they are "independent" of one another, that means you can't transform one equation into the other one. Here's an example of dependent equations,

x + y = 4

2x + 2y = 8

You can derive the second equation from the first by multiplying both sides by 2. In the example here, the dependent equations mean you can't solve for x and y, even though you have two equations.

Here's an example of independent equations,

x - 2y = -1

4x + 3y = 7

There are no scaling operations you can do to transform one into the other. That's what independent means. When you are asked to solve a system of equations, this is the property you need that allows you to get a unique answer for each variable. In the case of circuit analysis, we are careful to gather up enough independent equations to match the number of unknown variables (voltages and currents).(8 votes)

- When writing the KCL equations for node a,b and c the conclusion is that you get N-1 independent equations.

But the equation for node a is trivial. The equation for either node c or b is redundant (linear transformation).

So shouldn't we get N-2 independent equations?(2 votes)- The KCL equation at node A may be trivial, but it still has to be accounted for. This node provides the path for i1 to find its way between node B and node C. Without it, we would lose track of where i1 went. You can make a small change to the circuit to see why N-1 KCL equations are needed in general: Sketch in a resistor connected between node A and node C (in parallel with the voltage source). This doesn't change the number of nodes in the circuit, but it does add one more branch. The KCL equation at node A becomes non-trivial, and it needs to be included as an independent equation.

Some textbooks have a term for nodes with 3 or more connections: "essential nodes". The nodes in the circuit with only two connections are called "non-essential", (or "trivial", in this article). You are told to write KCL equations for the essential nodes and don't bother writing the non-essential node equations. Node A is included in a subtle way: when you write the equations for B and C you use the knowledge that i1 is the same current in both nodes. See how node A sneaks in there? It really does provide an independent equation.(6 votes)

- i know graph theory but how does graph theory show us the number of meshes?(1 vote)
- 5 years too late, but if you construct a minimum spanning tree (no meshes) of the nodes, you use N - 1 elements. Then, each additional element added to the graph introduces a mesh. And since there are E - (N - 1) elements after constructing the minimum spanning tree, there are E - (N - 1) meshes.(3 votes)

- Does a Voltage source has Resistance in it? If no, then why do we need an equation even for the voltage source in the example (the one with 140 volts)? We would just require equation for the three resistors, isn't it?(2 votes)
- Hello Abhishek,

An ideal voltage source has zero resistance.

A real voltage source such as a battery or power supply may be modeled as an ideal voltage source in series with a resistor.

These videos I made may help explain:

https://www.youtube.com/watch?v=cYGHibYmzb0

https://www.youtube.com/watch?v=rWYgoL-wzNE

Please leave a comment if you have any questions:

Regards,

APD(1 vote)

- You say we need 2E equations but don't the node voltage method and the mesh current method use way fewer than that?(1 vote)
- The Methods have the right number of equations built in. Remember, half of the required equations are the I-V equations of the individual circuit elements. The other half of the equations are generated by describing the connectivity between elements using KVL and/or KCL.(2 votes)

- if we have simple series circute with just a battery and 3 resisters should we write 3 equations for KCL?isn't that redundant?because is the same current that flows everywhere.so is 2E sometimes just for making sure?(1 vote)
- I got that there are N-1 independent KCLs as well as E-N+1 independent KVLs. But I do not understand why KCLs and KVLs are independent to each other. Why KCLs and KVLs are independent to each other?(1 vote)
- The way you demonstrate two equations are independent is to show you cannot derive one from the other. You can see an example showing dependence if you search the article for the hint/link "please demonstrate". If you attempt to do show dependence and you can't, that proves the equations are independent. As an experiment, make up a simple circuit with real values, write out a KCL equation and KVL equation and attempt to show they are dependent.

The way I think about it is that each time you use KCL or KVL you are pulling information out of the circuit connectivity and representing it in equation form. KCL and KVL are different techniques, so they gather information from different components. As long as each equation has something new in it that's not represented in other equations, it will be independent.(1 vote)

- The number of equations to be solved by mesh analysis for a given circuit is equal to

i. The number of independent loops

ii. The number of nodes

iii. The number of branches

iv. One less than number of independent loops(1 vote)- v. The number of independent variables(1 vote)