I have a +-24 V supply and I want to power an op amp. I initially tried an LM324 using a single +24V supply, but I then discovered that I want the op amp to be allowed to output negative voltages too (which the 324 can't). I could not find an op amp that can take e.g. max +-25 V so that I can connect it immediately to my supply. Would just a voltage divider do?
A LM324 can handle up to 32 V supply, so ±15 V would work and give you most of the voltage swing a LM324 can have. A opamp takes relatively little current, so basic linear regulators will do. You've got plenty of headroom, so the 78xx series will be fine. You can use a 7815 to make +15 V from the +24 V supply, and a 7915 to make -15 V from the -24 V supply.
If you're trying to output a signal moving a few volts either side of 0V, then you could produce +ve & -ve rails from your +/-24V using a positive and negative regulator, then power any old op-amp of those.
If you want enormous voltage swings on the output, then you could use a high-voltage op-amp which you can power directly off the +/-24V rails. Don't do this if you're going to put the output in something which can't take such large voltages though.
Or if you're doing AC-only (audio, for example), you can couple the signal via a capacitor and bias things up off you 0V rail.
"High-voltage op amp" in google found me this: LM143 http://www.ti.com/lit/an/snva516/snva516.pdf which will take +/- 40V supplies.
Never used it, don't know what it's like, but there are clearly suitable products around.
You should say something about the type of signal you're trying to handle.
Using just a pair of voltage dividers to produce the supply rails for the op amp is a bad idea as the supply current drawn by the op amp will vary and will result in varying voltage supplies. You should use a pair of linear regulators instead such as the 7812 for the positive rail and 7912 for the negative rail. (More modern equivalents also exist).
Or as mentioned by Will Dean, if you want to be able to produce large output voltage swings, use a special purpose high-voltage op amp IC.
Alternatively you could bias the opamp to halfway between your power supply (12V) to have a similar effect. In this scenario "negative" values of output would be on one side of 12V and "positive" values on the opposite.
Finally, no you do not want to use a voltage divider for a power rail to an IC for a variety of reasons. Fluctuations in current consumption will cause the supply to dip or rise and the chip won't operate properly.
You can use a resistor and a zener diode to provide a limited voltage version of your 24 volt rails, maybe +/- 15 volts. It won't be as rock-steady as a linear regulator but would certainly suit most applications. Most op-amps only need a few milli amps or less so 1k resistors to 15 volt zeners can supply up to 9mA. In fact that will be the current going into the zener when not connected to an opamp. If space is an issue and leaded components are the only option this might be a decent solution.