You need more than the definition of perpendicular, you need the definition of "angle" in such a way as to ensure flatness of your space, otherwise a triangle might not correspond to three vectors that sum to zero. In this case, you cannot obtain the pythagorean identity from the algebraic identities.
Remember a triangle is a set of 3 curves living in your space that meet back up. But angles between curves are measured as angles between the tangent vector to the curves and do not live in your space, they live in the tangent space.
A triangle on the sphere, for example, has angles that don't sum to 180 degrees and the three tangent vectors do not sum to zero even though the three curves meet back at the same point.
So what's crucial here is an assumption of flatness, which allows you to associate a tangent space to the underlying space in a way consistent with the underlying metric. This allows you to make the association between geodesics (distance minimizing curves in your geometry) and vectors in your tangent space so that you can pretend that the straight lines actually live in your space and are also distance minimizing. This is what you need for the pythagorean theorem.
This is not something that you can get just from the distributive law, you need the distributive plus the property that a triangle has angles that sum to 180, or equivalently that the tangent vectors to your triangle can be embedded in your space and sum to zero.
Notice I mentioned “Euclidean space”. That inherently involves flatness. Obviously there are several premises/axioms needed to set it up, and a variety of ways to do so.
In Euclid, we have the famous parallel postulate which helps us establish flatness.
> angles that don't sum to 180 degrees
Note that Euclid’s Elements nowhere mentions angle measures. It only describes the concept of a right angle (and angles more or less than right). The Pythagorean theorem does not depend on angle measures. If you ask me angle measures are a quite poor/confusing tool to introduce in introductory Euclidean geometry courses, since they are a type of logarithm, and much more inherently complicated than the rest of a typical geometry course.
> triangle is a set of 3 curves
This is one possible definition of “triangle”. For Euclid a “trilateral figure” is contained by three straight lines, and “A straight line is a line which lies evenly with the points on itself.” (Which has been rather hard for readers to interpret throughout time.)
How you are going to define euclidean space without the pythagorean theorem? That's basically the definition of euclidean. But the advantage of the pythagorean theorem is it allows you to measure how you deviate from flatness by comparing the difference of c^2 with a^2 + b^2.
That was my point upthread (any proof of the Pythagorean identity is somewhat circular, since it is inherent in the structure).
The way Euclid does it is to set up various axioms which imply flat space without explicitly declaring the Pythagorean identity to be an axiom. But you could easily do it the other way around. Euclid’s axioms (and other alternatives proposed over the years) were chosen specifically to make the Pythagorean identity true.
I see, yes, Euclid's axioms are not the most intuitive approach to different geometries.
What is nice is to have the tools to examine what the properties of a given geometry are, and given that geometry is a matter of curvature, it's not going to be decided by the tangent plane, it's going to be decided by the second derivative. You can get at that explicitly by embedding your space in a flat space like R^N and looking at the second derivative, or you can do intrinsic operations like parallel transport. E.g. look at small variations in the tangent plane from point to point. But the second derivative is key. Geometric algebra lives in the cotangent plane so it alone is not going to detect issues of curvature in your underlying space. This is true even though a lot of important calculations about differentials and volume elements are happening in that cotangent plane, so it's an important thing to get right, but it can't detect issues of curvature and thus it can't 'prove' the pythagorean theorem, which is a flatness statement.
Remember a triangle is a set of 3 curves living in your space that meet back up. But angles between curves are measured as angles between the tangent vector to the curves and do not live in your space, they live in the tangent space.
A triangle on the sphere, for example, has angles that don't sum to 180 degrees and the three tangent vectors do not sum to zero even though the three curves meet back at the same point.
So what's crucial here is an assumption of flatness, which allows you to associate a tangent space to the underlying space in a way consistent with the underlying metric. This allows you to make the association between geodesics (distance minimizing curves in your geometry) and vectors in your tangent space so that you can pretend that the straight lines actually live in your space and are also distance minimizing. This is what you need for the pythagorean theorem.
This is not something that you can get just from the distributive law, you need the distributive plus the property that a triangle has angles that sum to 180, or equivalently that the tangent vectors to your triangle can be embedded in your space and sum to zero.