$\begingroup$

This happened to me this year briefly. "I have literally a degree in this. I have done it professionally now, for something like 5 years. When I say it's this way, it's absolutely this way." Shut them up immediately.

Edit: Since more details were requested, I will follow this up. You have three problems:

They don't respect you

They are disrupting your class

And they are being rude TO you.

The most immediate issue is the classroom disruption. It is evident from your comment that you are not in charge of the situation here. This may be an unusual situation, or it may be that you were never in charge and this student is making it substantially worse. In either case, the correct thing to do is to move on without them. Put them into a position where they have to accept your decision to move on, or brazenly violate your control of the class. State you are moving on, AND THEN DO IT. You are giving them permission to disrupt your class by doing anything else. Don't consent to it. The other students in the class are well aware the student is being a jerk - the social pressure exerted on them when it is apparent you know what you are doing and they don't is enormous, so if they insist on doing the fight publicly, you can win it. They WILL shut up.

Next up, there is the issue that they don't respect you/your abilities. You can address this directly as I did in my pithy answer, or you can do it indirectly. This student is evidently confident about their math abilities - you are a grad student. You want to see them realize how out of their depth they are? Put some real analysis on the board. Or better yet, some complex analysis. Nothing like a zeta function to terrify a student. If they are the keen and excited student you describe them as, this is the perfect way to deal with the issue. (Edit: to be clear, I suggest you do this after class, in private)

Last, if all this fails, you have the issue that they are being rude to you, and apparently your efforts to control them in class or gain their respect have failed. At this point you need to deal with this directly through the university bureaucracy. This is the worst case, but it will deal with the problem. You have a student who is refusing to let you teach, and you have every right to have them removed. This isn't elementary school, they don't have a legal right to this education, if they don't like it they can GTFO. Just the threat of this is sufficient in the once in a VERY rare while it is needed. I've TAd for a decade now, and I've only had to threaten this once, and certainly I've never needed to carry it out.