In the figure given below, assume that the diode and op-amp are ideal. \$V_{i}\$ varies from +1V to -1V. How will the output voltage \$V_{0}\$ vary?
No, it is not correct. You seem to have neglected the ideal diode. 

If the output is > 0 (meaning the input is &lt; 0) then the diode will not conduct, so the gain will be higher than your calculation. 

If the output is &lt;0 (meaning the input is > 0) then the diode will conduct, so the gain will be as you say.