Is it math for studying logic or logic for studying math? I'm confused on what it really is.
Mathematical logic is a reasoning system that is sufficiently well-defined that it can unambiguously be applied to (for example) the control of complicated machinery- including things like trains and airplanes. This means that things like computers are ideal for its implementation.
As such, it is not designed for reasoning about things like for example ethical, psychological, or political issues- which cannot be managed on computers.