ChatGPT is not fully an AI, it's a machine learning language model trained on a large data set. It wasn't taught mathematics specifically, but it can emulate the language of math and logic (though it has no inherent understanding).