This depends on the stage your at, and MOST importantly, what type/wattage of lamp you are using. If you are using fluorescent tubes (1-2 inches), compact fluorescent (CFL's; 2-4 inches), and HID (Metal halide or high pressure sodium) depends on the wattage. The issue that is important here is yes, you want the light as close as you can, where it is more intense, as the light drops exponentially as you move away, however, you don't want the light so close that after sitting for a couple hours, you burn the plant. One can find information for suggested distances for various wattages of HID. As they are suggestions, and the most simple thing you can do, is you have your hand out horizontally at the top of the crop, at the canopy, under the light, leave it there for 60 seconds. If it gets too hot for your hand, it's too hot for your plant! Usually HID's around the 250W-600W it's about a foot, and for 800-1000W something like 1.5 feet. Since you ask about 2 inches, I assume you are using fluorescent lighting, and yes, if the light level is too low or too far away, growth will be hampered. I know there used to be a nice faq's section on this site that had pretty much everything one needs to learn to handle a grow but, since the move/change to the new look, I haven't been able to find it, though I'm sure you can find the info you're looking for in a sticky in the newbie central threads, Widow Maker has a nice thread you can read through, and here's the section about lights.
https://www.rollitup.org/4674-post6.html
Good luck with the grow!