In the 1st diagram below a 2 wire nm cable supplies power from the panel to the first switch box. In this diagram the electrical source is at the first switch and the light is located at the end of the circuit.

Multiway Switching Wikipedia
How to do 3 way switch wiring. Fixture between two three way switches. Wiring diagram 3 way switch with light at the end. Power through switch light is controlled by two three way switches with the light between the switches and the power first going through a switch then to the light and onto the second three way switch. The wiring method will. The ground wire is pigtailed with a wire connector at the switch boxes and the ceiling box. However that is not the only way to convert a single pole switch to a 3 way.
To do this the opening steps getting ready and assembling tools remains the same. With a pair of 3 way switches either can make or break the connection that completes the circuit to the light. The black line wire connects to the common terminal of the first 3 way switch. A 3 way switch allows you to turn a light on or off from two different switches. Wiring a 3 way light switch is certainly more complicated than that of the more common single pole switch but you can figure it out if you follow our 3 way switch wiring diagram. Wiring a 3 way light switch.
This might seem intimidating but it does not have to be. To wire a 3 way light switch youll need 2 3 way light switches 2 2 wire non metallic cables 1 3 wire non metallic cable and 2 6 inch grounding wires. A 3 wire nm connects the traveler terminals of the first and second 3 way switch together. 3 way switches are useful for large rooms with multiple entrances but require a bit more wiring than a standard single pole switch. First run a 2 wire cable from the wall power to the black screw on 1 of the switches. Pick the diagram that is most like the scenario you are in and see if you can wire your switch.
3 way switch wiring diagram. Traveler wires are interchangeable. Take a closer look at a 3 way switch wiring diagram. The black and red wires between sw1 and sw2 are connected to the traveler terminals. Three wire cable runs between the switches and 2 wire cable runs to the light. With these diagrams below it will take the guess work out of wiring.
When it comes to the 3 way switch wiring use a black wire in the top 2 wire conductor to attach the switch to the source. If you want to go another way you can. Typical 3 way switch wiring nm cable.