If you might still be struggling with the idea of a transfer function, then here's a very clear example. This is the ScanWizard Curve Tool with the curve inverted, and we get a negative image. Just grab the 0 end point and pull it up to 255, and pull the 255 end point down to 0.
Now you can see that the response is that White input becomes black output (255 input becomes 0 output). Also black 0 input becomes white 255 output, because the curve runs the opposite direction now. Scanning a negative would give us a positive image (if we had a Transparent Media Adapter and a large negative).
Done this way, we'd still have to deal with the orange mask on a color negative because the software will not balance it automatically unless either a TMA or a film scanner is detected, so that negative mode can be selected. But if so, then ScanWizard provides these film menu modes.
This section is just to show the concept, because there is also an INVERT menu item at Preview Preferences that does this same inversion.
I hope the transfer function graph concept is made clear, because it's the fundamental basis of both the Histogram tool (Levels) and the Curve tool.
Here is another page, showing how the Curve tool and the Levels tool very similarly can do the same actions.