My simple answer is: Go for it! I have done a PhD in mathematics myself (also in the UK), and although I have since changed career in a direction where it has not been that useful, I have never regretted it! And I’m sure I would have regretted it if I hadn’t done it.
Thinking a bit more about the question, I wonder if “Should I do it?” was really the question you wanted to ask? It seems not quite well-defined, when you are not stating any alternatives. Were you hoping to answers to “What other options do I have?”, “How do I get started on this path?”, “Will the change from CS to maths be too big?” or something else?
I’m not the right person to answer what other options you have. About the two other questions, I think you should focus on who you want as a supervisor, rather than whether it will be in mathematics or in computer science (I actually thought my PhD was in both maths and CS while I was doing my PhD, and only learned that it was only in maths when my diploma arrived! One of the examiners who awarded my PhD later told me he thought he had awarded me a PhD in CS!). If you find the right supervisor, it is not important if they are in CS or maths or something else.
My simple answer is: Go for it! I have done a PhD in mathematics myself (also in the UK), and although I have since changed career in a direction where it has not been that useful, I have never regretted it! And I’m sure I would have regretted it if I hadn’t done it.
Thinking a bit more about the question, I wonder if “Should I do it?” was really the question you wanted to ask? It seems not quite well-defined, when you are not stating any alternatives. Were you hoping to answers to “What other options do I have?”, “How do I get started on this path?”, “Will the change from CS to maths be too big?” or something else?
I’m not the right person to answer what other options you have. About the two other questions, I think you should focus on who you want as a supervisor, rather than whether it will be in mathematics or in computer science (I actually thought my PhD was in both maths and CS while I was doing my PhD, and only learned that it was only in maths when my diploma arrived! One of the examiners who awarded my PhD later told me he thought he had awarded me a PhD in CS!). If you find the right supervisor, it is not important if they are in CS or maths or something else.
Thanks for the answer!
Out of curiosity, what career did you transition to?
I’ll be keeping this in mind.
Software development/consultancy.