Not getting the ambient light you want? Have you ever considered the possibility of adjusting the light intensity to the level that comforts you and your families? All you need is a dimmer switch. It's no news that some houses are currently applied with dimmer switches for their light installation.
By installing a light dimmer in a simple design, you can easily control the indoor lighting condition for your specific needs of reading, watching TV, sleeping, etc. In addition, it lengthens the bulb lifespan as well as help saves energy consumption. What's more, do you know that excessive brightness could harm your eyesight and somehow tamper with the romance? So better put it on schedule if you don't have one in your hallway.
Contents

Leviton 3-way dimmer switch
What is a 3-Way Dimmer Switch?
A 3-way dimmer is just a light dimmer (wall dimmer) wired in a three-way switch manner. Compared to the single-pole dimmer switch, which combines on/off toggle and dimming functions, a three-way switch is usually preferred when the house has a multi entrances. Because it allows you to dim the fixture on one panel and turn the lights on/off on another.
In a modern smart home, it's convenient that you won't have to walk through the whole stairs to control the lighting, especially when coupled with the sound-control mechanism.
Dimmer Switch Types
Three-way dimmer switches can be divided into two categories, using different light output control methods.
Electronic Low Voltage (ELV) Dimmer

NOON ELV dimmer extension switch
Electronic Low Voltage (ELV) Dimmers were initially designed to control Electronic Low Voltage Transformers found in low voltage (12V) light fixtures. ELVs operate by reverse phase input power control widely used in MOSFETs. Therefore, it often requires neutral wires in ELV dimmer design.

Power on/off vs. light output diagram for reverse phase control dimmers
ELV dimmers and transformers are more expensive, but they operate more quietly, provide better control (smooth dimming) capability, and last longer than Magnetic Low Voltage Transformers (MLV). They are more suitable for LED light sources, so generally, you'll find them in home depot applications.
Magnetic Low Voltage (MLV) Dimmer

Lutron wireless programmable smart dimmer
Magnetic Low Voltage (MLV) Dimmers apply a TRIAC-based switch control measure as a forward phase light output control. TRIAC dimmers are designed for resistive loads like incandescent or halogen lights, and they have a large installed base in the US.

Power on/off vs. light output diagram for forward phase control dimmers
Magnetic Low Voltage (MLV) dimmers are intended to be used in conjunction with a magnetic driver. This sends power to the driver in a way that it can read and respond to without damaging the driver hardware. Besides, there's no rewiring work needed for replacement, so it's a primary method for retrofit jobs. Compared with ELV dimmers, MLV dimmers are less expensive and more commonly seen in commercial uses.
How to Wire a 3-Way Dimmer Switch?

(Image source: Wikipedia)
Above is a typical 3-way dimmer switch diagram. A 3-way dimmer switch is usually combined with a dimmer dial and an on/off switch. On a three-way switch configuration, switches are always used in pairs.
The wiring schematic is about three wires: 1 common wire (see the figure) stretches from the AC power source and leads towards the first switch and then comes from the second switch to the light bulb. This is considered the "hot" wire which is often colored black; 2 traveler wires (the red and white wires in the figure) connect the two 3-way switches.
The two traveler wires are used in this wiring design to allow any light switch to control the light fixture. Not only that, but you can use one switch to turn on the light and the other switch to turn it off.
How to Install/Replace a 3-Way Dimmer Switch?
Materials
Dimmer Switch
Wire Stripper
Screwdriver
Electric Pen
Procedures

some switches require to be pried open but not screwed out (Image source: ifixit.com/Guide/Light+Switch+Replacement/119563)
Turn off the electricity.
Unscrew the switch plate from the wall using the screwdriver
Dismount the existing switch
Strip the wires from the switch house at the bend
Use the electric pen to confirm there's no electricity residential around and in the switch plate
Strip 1-2 inches of the insulation cover from the dimmer switch wires

ground wire - green, traveler wires - red and the one with a white stripe, hot wire - black (Image source: reddit.com/r/electrical)
Connect the ground wire of the dimmer to the ground wire of the switch socket. The ground wire is usually colored green or copper and often its terminal is located at the middle bottom of the dimmer.
Connect the hot wire (common wire, usually colored black) of the dimmer with the hot wire in the outlet. Note that the hot wire on your dimmer could be red and may get you confused with the traveler wires. If that happens, get a reference on the manual.
Connect two traveler wires to the traveler wires in the switch socket. There could be different combinations of colors: red and white, red and black, etc. Also, some manufacturers will label the traveler wires with a white stripe. Moreover, their terminals are often marked with "RD."
Cover the wiring with plastic wire caps and hang the dimmer switch. Replace the switch plate and screw it back into the wall after testing the connection.

wrapping wires with protective wire caps (Image source: asktheelectrician.com)
Installation Tips
Make sure your light fixture is dimmable.
If you're using LED bulbs, look at the dimmer compatibility PDF on each LED light bulb product page to ensure you won't have any issues. Keep in mind that LED bulbs do not dim as well as other types of bulbs.
When installing an electrical switch and socket, use specific dimmer ballast instead of standard fluorescent ballast.
Calculate the total watts that your 3-way dimmer switch will regulate. A reasonable rule of thumb is never to exceed 80% of the rated load for any electrical component or device when calculating electrical loads.
If you're going to sand drywall, don't put the dimmer in before you do so since dimmers don't like dust.
Some dimmer switch doesn't require a neutral wire which performs to complete the electricity flow by connecting the circuits back to the load. It's generally colored white or grey, so if the dimmer switch does require one, don't mistake it with traveler wires which are "hot" when the switches are on.
More blogs about switches:
>> Push Button Switch: Explained
>> Managed vs Unmanaged Switch: Which to Choose?