A basic inverting transresistance amplifier can be built from an operational amplifier and a single resistor. Simply connect the resistor between the output and the inverting input of the operational amplifier and connect the non-inverting input to ground. The output voltage will then be proportional to the input current at the inverting input, decreasing with increasing input current and vice versa. In practice, the parasitic capacitance of whatever device is connected to the virtual ground of the op-amp may destabilize it, and a compensating capacitance must be added in parallel with the resistor between the output and inverting pins. Arriving at the optimal value of this compensating capacitor can be non-trivial.