The thing to keep in mind is not only voltage and current in understanding this; you must also calculate power.
Consider this:
simulate this circuit – Schematic created using CircuitLab
Notice all the circuit values are 1 in the circuit - (1 volt, 1 ohm, 1 amp, and 1 watt). There is no need for a calculator on this circuit since if you apply the value of 1 to any two of the variables in any of those Ohm's law formulas, the mathematical result will always be 1 again.
The power supply is supplying 1 volt @ 1 ampere and is therefore producing 1 watt of power. If the power supply is producing power, then that power mathematically must be being dissipated (in the form of heat) somewhere else in the circuit.
Since current-reading meters, or ammeters, have near-zero resistance, the ammeter is not consuming or dissipating any meaningful amount of power. How do we know this? Let's say the ammeter resistance inside of it is 0.01 ohms (which is reasonable). If the ammeter is passing/showing 1 ampere of current, then the power dissipation (P = I^2*R) = 1 (ampere) squared times 0.01 (ohms) = 0.01 watts. This is a minuscule amount of power dissipation and can safely be ignored in this case.
So, if the ammeter is not dissipating any power, who's left to dissipate the 1 watt of power that the power supply is producing? It must be the resistor. Since the resistor is dissipating that 1 watt of power, and since power is always dissipated in the form of heat, the resistor temperature increases in unison (linearly) with the power that it is having to dissipate.
Now, what happens if we change the Voltage (E) to 2 volts instead of 1 volt? The 1 ohm resistor will now have 2 volts across its leads. (It will be dropping 2 volts.)
Let's do the Ohm's law math now.
Knowns:
- Circuit Voltage = 2 V
- Circuit Resistance = 1 ohm (again, ignoring the small ammeter resistance)
- Circuit Current (I) = E/R = 2 V divided by 1 ohm = 2 amperes
Calculations based on Ohm's law:
- Power supply is producing: P = I*E = 2 volts * 2 amperes = 4 watts
- Resistor is dissipating: P = E^2/R = 2 V squared divided by 1 ohm = 4 watts
So as can be seen, if the load (device) resistance remains constant, then an increase in input voltage will cause the circuit power to increase quite a bit. For every doubling of input voltage, the circuit power increases by a factor of four. And remember, the circuit power produced by the power supply mathematically must be being dissipated by the load or device connected to that power supply. (They are equal at all times.)
In your question, you asked what if a 5 V, 2 A adapter powering a device were replaced with a 20 V, 2 A adapter.
Let's assume that the device consumes all of the power given to it from the initial adapter (5ampereV, 2ampereA):
- The resistance of the device then must be: R = E/I = 5 V/2 A = 2.5 ohms
- The power dissipated by the device must be: P = I*E = 5 V*2 A = 10 watts
Now you replace the first 5 V, 2 A adapter with a 20 V, 2 A adapter:
- Assume the resistance of the device remains the same (2.5 ohms) since no changes were made to it.
- The power supply voltage now changes from 5 V to 20 V, which means that the device must now dissipate 20 V squared divided by 2.5 ohms = 400/2.5 = 160 watts!
Fortunately, your new adapter can only supply 20 V * 2 A = 40 W of power.
The voltage on the 20V adapter will likely drop until it meets its maximum power output while still trying to maintain 2 A of output current - it's still going to try to deliver 40 W of power which means that one way or the other (either by over-voltage or over-current or both), you're still damaging your poor device which is only designed to handle 10 W.
Power is the meaningful calculation in many cases such as this one. Whether you're dealing with a 20 V, 2 A or a 2 V, 20 A power supply, either way the math says that the maximum power dissipation will be 40 W. That's why they are called power supplies, since any combination of output voltage and current can never exceed the P = I*E law.
Note: All of the above assumes that your device (load) is constant, like a resistor (or resistive load) would be.
Things change when applying too much or too little input voltage to electronic devices, as many times they do not represent a resistive load. They are nonetheless susceptible to damage should the input voltage rise high enough to damage the internal semi-conductors (transistors, etc.) as well as passive components (capacitors, etc.)
ohm's law
\$\endgroup\$