Temperature gauge jump

This morning when I got in my 2002 ford ranger 3.0 to goto work I noticed the air was cold and not warming up . I looked at the temperature gauge and it still registered cold like I just turned it on. Then about 5 minutes into driving it jumped to red line and the air inside the cab immediately got hot. The gauge hovered at red line for about 5 seconds then went to normal operating temperature and I did not have a problem the rest of the drive. Is this the thermostat?

It might be the thermostat. You might also have an air bubble in the cooling system that got created or was stuck in the heater core at the first cold snap. Keep an eye on the coolant level as well as the temp for a bit. Also if your fuel mileage seem a bit less than normal the thermostat could be partially stuck open and delaying warm-up. That will hurt the mileage.