Wherever you are right now, there's probably an electrical outlet within easy reach.

Whether you want to vacuum the living room or recharge your phone, all you have to do is plug into the wall, and bam - instant access to electricity.

But have you ever wondered how all of that electrical power gets to your house, school, or office in the first place?

There are a lot of steps, but two of the most important ones involve electric generators and transformers.

And both of these devices work because of a concept we introduced last time: induction.

[Theme Music] Electric generators are like the opposite of electric motors.

Motors take electrical energy - so, the current running through a coil of wire - and convert it into mechanical energy as the motor turns.

Generators, on the other hand, take mechanical energy - the rotation of a coil of wire - and use induction to convert it into electrical energy, in the form of a current running through a wire.

Generators use a wire wound around something called an armature - basically, a cylinder that rotates within a uniform magnetic field.

As the loop rotates, the changing magnetic flux induces a current in the loops of the coil.

But the angle that the coil makes with respect to the magnetic field keeps changing, which causes the direction of the induced current to reverse itself at every half-turn.

So the magnetic field in the generator stays constant.

But because the coil is rotating, the angle between the coil and the magnetic field changes.

This means that the magnetic flux through the loops in the coil changes over time, which is what induces an emf.

And as we'll soon see, the emf depends on the sine of the angle between the coil and the magnetic field.

So for half of the rotation, the sine of the angle is positive, and for the other half, the sine of the angle is negative.

When it's positive, the current flows in one direction.

When it's negative, it flows in the other.

This means that the direction of the current flips with every half-rotation.

This produces a type of flow of electricity known as alternating current, or AC.

Until now, we've mainly been talking about DC, or direct current.

There are DC generators, which include special parts to make the current keep flowing in the same direction the whole time, instead of reversing itself as the coil turns.

But AC power is the kind that flows from the outlets in your walls.

And in most places in the world, it reverses itself either 50 or 60 times per second.

This is called the frequency of the current, and you'll normally see it written in hertz.

Now, we can calculate the strength of the emf in a generator using some of the principles we talked about last time.

We've already described what happens when you move a loop of wire in or out of a magnetic field: The emf induced in the wire is equal to the strength of the magnetic field, times the length of the loop, times its perpendicular velocity.

In other words, it's the velocity times the sine of the angle between the magnetic field and the loop.

And the same idea applies to a coil of wire rotating in a magnetic field, too.

We just have to replace some of the variables with ones that apply to a rotating coil.

First, instead of the length of the loop, we'll use the area of one loop of the coil, A.

And instead of translational velocity, we'll use angular velocity, I.

Next, the angle, theta, is just equal to the angular velocity multiplied by time.

And finally, instead of finding the emf in just one loop of wire, we're finding the emf in a whole coil of wire.

Which means that we need to multiply this equation by N, the number of loops in the coil.

So, the emf induced in a coil rotating in a magnetic field is equal to the number of loops in the coil, times the strength of the magnetic field, times the area of a loop of the coil, times the angular velocity, times the sine of the angular velocity multiplied by time.

It's a bit of a mouthful, but that's because there are so many factors that affect the emf induced in the coil.

Basically, the equation is saying that you'll have a greater induced current in the generator if there are more coils in the wire, or if there's a stronger magnetic field, or if each loop of the coil is bigger, or if it rotates faster.

Now, it might seem kind of strange to have a generator produce a current that reverses itself dozens of times a second.

But actually, this is incredibly useful.

That's because another important device that gets electricity from the power plant to your house is a transformer, which is made up of two coils of wire.

And transformers only work with AC power.

They're necessary because one of the problems with transmitting electricity over long distances is that, if the voltage is low, a lot of power gets wasted as heat.

We're talking like 80% in some cases.

Which is a huge waste of energy!

When electricity is transmitted at higher voltages, though, much less power gets wasted as heat.

That's because, for the same power, a lower voltage translates to a higher current, and power loss increases proportionally to the square of the current.

In other words, if you double the voltage, you end up with only a quarter the power loss you had before.

And if you triple the voltage, you get a ninth of the power loss.

So it's worth transmitting electricity at very high voltages.

But then you need a way to change the voltage of the electricity running through the lines - from its original voltage from the generator, which could be around 12,000 volts; then up to a very high voltage as it travels long distances, which might be as high as 240,000 volts.

That's definitely not safe to use in your household appliances.

So once the electricity gets to where it needs to go, you need to lower its voltage again.

In the US, the power coming out of your wall is 110 volts, and in most other places it's 220 volts.

All those voltage changes are made using transformers, which take advantage of something called mutual inductance, where a change in the current in one coil leads to a change in emf in another, nearby coil.

And emf is the same thing as voltage.

This change happens because the changing current in the first coil produces a changing magnetic field.

So the magnetic flux through the second coil changes, which induces an emf.

And the emf induced in the second coil will be equal to the change in current in the first coil, divided by the change in time, and multiplied by a constant, M. M depends on things like the size and shape of the coils, and how they're positioned relative to each other.

This works in the opposite direction, too: a change in current in the second coil will induce a corresponding emf in the first coil.

In transformers, the power running through the first coil is AC, which means the current and the magnetic field it produces are constantly changing.

So an emf is induced in the second coil.

But if the second coil has more turns than the first, it'll have a higher voltage, and vice versa.

Here's why: Faraday's law, which we talked about last time, says that the emf - or voltage - in each coil is equal to the number of loops in the coil, times the change in magnetic flux over time.

We can write this out as an equation for each coil separately, using a subscript P for the primary coil and a subscript S for the secondary coil.

Now, we want to know how the voltage in the secondary coil compares to the voltage of the primary one.

To find out, we divide the voltage in the secondary coil by the voltage in the primary coil.

The change in magnetic flux over time cancels out, which leaves us with a simple but useful equation: The voltage in the secondary coil divided by the voltage in the primary coil is equal to the number of loops in the secondary coil divided by the number of loops in the primary coil.

So if the secondary coil has twice as many loops as the primary coil, it'll have twice as much voltage.

And if it has triple the loops, it'll have triple the voltage, and so on.

If the secondary coil has more loops than the primary coil, so that it increases the voltage, that's called a step-up transformer.

And if it has fewer loops than the primary coil, so it decreases the voltage, that's a step-down transformer.

As the electricity in power lines travels from the power plant to your house, it goes through lots of step-up and step-down transformers.

If you've ever seen a Tesla coil in action - that's just a fancy version of a step-up transformer.

The secondary coil is designed so that it shoots out bursts of electricity that look like lightning bolts.

Mutual inductance is also used in lots of other things, too - like wireless chargers, for example.

Lots of cell phones have a wireless charging feature, where you just put the phone on top of a charging pad and it charges.

No need to plug anything in.

It works because there's a coil inside the charging pad, and another one inside your phone.

The AC power running through the charging pad induces an emf in your phone's coil, which can use the energy to charge its battery.

So the same technology that helps get electricity to the outlets in your wall can move power from one device to another - even if there are no physical connections between them.

Today, you learned about how electricity is produced and transmitted.

We explained how electric generators work, and derived the generator equation.

We also talked about transformers, and how they use mutual inductance to change voltage.

Finally, we described how mutual inductance is used in wireless chargers.

Crash Course Physics is produced in association with PBS Digital Studios.

You can head over to their channel and check out a playlist of the latest episodes from shows like: The Art Assignment, Blank on Blank, and Braincraft.

This episode of Crash Course was filmed in the Doctor Cheryl C. Kinney Crash Course Studio with the help of these amazing people and our equally amazing graphics team, is Thought Cafe.