Using circuit shown below, we can invert or amplify without inversion by flipping a switch. The voltage gain is depending on the switch position. It could be either +1 or -1. The variation of the circuit comes in two version, A and B.
I personally prefer B version, since there is no moment when the noninverting input voltage level is undefined. In A version, when the switch is flipping, the noninverting input is momentarily floating, this can led to an unpredictable voltage indu1ced through the switch’s wiring, making a hard click or pop noise.
This phase inverter circuit is useful to provide a polarity control, for example, many stereo power amplifier provide this function on one of the channel (L or R only) to flip the phase in case there’s error in loudspeaker wiring or installation, since it’s easier to push a switch than to rewire the cables.