A TIP31 is totally unsuitable for this.
It would need 300mA base current for a 3Amp strip, something an Arduino pin can't supply.
Better use a logic level mosfet, or a relay module if you don't have to dim your strip.
If you go for a relay module, note that the Arduino can only power ONE 5volt relay module if you power the Arduino with 12volt (on the DC socket or V-in).
Another option is 12volt relay modules.
Leo..