How come my arduino works when I have it connected to my pc for power, but not my 9v battery?

I have no idea what you mean.
I suspect you don't either

No - if you're giving bad advice that may cause damage to others' equipment, we definitely will argue

sorry then

Where and how are you using 5V ?
Are you using the barrel jack, by any chance ?

If you power an Uno through the USB socket (PC or cellphone charger),
then you can draw about 450mA from the 5volt pin. It bypasses the 5volt regulator.

If you power the Uno with 9volt on the DC socket,
then you can draw 250mA from the 5volt pin before the 5volt regulator eventually overheats.

If you power the Uno with 12volt on the DC socket,
then you can draw 100mA from the 5volt pin before the 5volt regulator eventually overheats.

See the problem?
Leo..