Laptop fan becomes very loud for a few seconds, and then laptop shutsdown

I just got a new 8GB stick of RAM yesterday (bringing me to a total of 16GB), and when I opened up my laptop this morning, it was powered off. I thought that was weird, because I don’t have it set to power off when not in use, and it was plugged in. So I just booted it up and started using it. Then, about 10 minutes ago, the fan became really loud for a few seconds, and the laptop just shutdown. Did I do something wrong when I installed the RAM, or is it just a coincidence?

This stopped happening, so I have no idea what it was.