Is kinetic energy formula tightly related to Pythagoras theorem? Consider 2 balls of mass $M$ traveling on the plain at speed $V$. One ball goes up and the other goes right. Let's associate them with the vectors $(V, 0)$ and $(0, V)$ to express their velocity and direction.
If one ball hits the other, we'll end up with one stationary ball and another one traveling by the vector $(V, V)$. From Pythagoras we know that $(V, V$) has a velocity of $\sqrt{2}V$. That means that one ball of mass $M$ and velocity $\sqrt{2} V$ has the same energy as 2 balls of mass $M$ and velocity $V$ each. This fits the $E = \frac{1}{2}MV^2$ formula. So, is this formula  true only in geometries that comply to Pythagoras theorem?
 A: In this case you assume that the collision is elastic. This means that there is no net loss of energy throughout the course of events, meaning
E=const.
Moreover, it is not necessary that one of the masses remain stationary, which you have assumed in this case (a basic introduction into this concept and a few examples are available here, on Wikipedia, CREDIT: https://en.wikipedia.org/wiki/Elastic_collision)
Also, when it comes to classical mechanics (not talking about Lagrangian or more complex systems), energy is not a vector, so work and energy are "seldom" linked with directions. In contrast to this, the momentum of an object IS a vector, that we link with a certain direction.
In your question it is important to ask what you mean by geometries that comply with the Pythagoras theorem - is it for non-curved spaces? Generally speaking when it comes to some problems you can select certain points of reference, which will help you describe the motion more easily (https://ocw.mit.edu/courses/physics/8-01sc-classical-mechanics-fall-2016/week-2-newtons-laws/4.3-reference-frames credit; MIT OpenCourseWare). You are describing a motion based around a certain reference frame. You can choose how you want to describe the motion of said object by selecting other points of reference. MIT OpenCourseWare, the channel which I've linked in the section link has great videos which will help introduce you to mechanics.
