Ohm’s Law is an empirical law. It is obeyed until it is not.
If a component obeys Ohm’s Law, it must have a constant V-to-I ratio. What if a component does not obey Ohm’s Law? It just means that the component does not have a constant resistance.
Suppose you are given an unidentified two-terminal component or device. To investigate its behaviour, you can apply different voltages across its terminals, and measure the resulting currents passing through it. If you plot the data as a current-voltage graph, you get the so-called I-V characteristic curve of this component.
The above I-V characteristic curve shows a non-ohmic component. It has a different V-to-I ratio when different voltages are applied across it. For illustration, let’s calculate the resistance of this component at three different operating points A, B and C.
Now let me introduce this visual aid of mine which I call the “wiper lines”. They are these lines that join the origin and the operating points (drawn in blue in the graph). Realize that the lower a wiper line leans towards the V-axis, the larger the V-to-I ratio, so the larger the resistance. Conversely, the higher the wiper line leans towards the I-axis, the smaller the V-to-I ratio, hence the smaller the resistance. This visual aid should help you see with just a glance that .