Why is a triangle a rigid shape? Triangles are used in structures because they are the most rigid shape. And they are many descriptions of this on network and, if I am not mistaken, this all comes down to the law of cosines.But why this holds? Is it maybe because if we connect three random points on a planes their internal angles will add to half revolution? Is there a more fundamental reason for the rigidness of triangles?
Engineer here, please don't mind the naive question
 A: By definition, a shape is rigid when the distances between its points is constant. In a triangle there are three pairs of points and if you fix the side lengths the shape is perforce rigid.
In a quadrilateral, there are six distances, but is is enough to fix five of them because they define two triangles, each rigid. Any point that you add takes two extra fixed distances.
If you consider the average number of distances per vertex,
$$\frac{2n-3}{n}$$ this is minimized by $n=2$ (a rigid bar). But a bar is a 1D stucture. Hence the minimum for a 2D structure is achieved by the triangle.

In 3D, that ratio is
$$\frac{3n-6}{n}$$ and the minimum (3D) is achieved by the terahedron. The first coefficient in the numerator is the number of dimensions $d$, and the second is a... triangular number, $T_d$.
A: If three lengths can form a triangle at all, that is, if the longest is less that the sum of the other two, there is only one triangle that they can form. You can uniquely solve for the angles, and the only way for them to change would be for (at least one of) the lengths to change.
If you have four lengths, from which you can assemble a quadrilateral, there are infinitely many sets of angles that could work. Just consider how a cardboard box collapses flat when the top and bottom are removed: you can see that the shape moves smoothly through various angle solution sets with no change in side lengths, starting at 90,90,90,90, and ending at 180,0,180,0.
A: For simplicity, let's think about shapes made up of line segments, which can't bend or stretch in any way, and "joints" between them, which can rotate but can't pull apart. (You can imagine solid metal bars with pins put through them, for example.)
First, imagine a unit-length line segment in a plane. We can say that this segment has three degrees of freedom: you can't fully specify it with less than three numbers (two for the position, one for the rotation).
This is a reasonable definition of "rigidity" within this model. So let's define it: a shape is rigid if it has no more than three degrees of freedom. In other words, it can be moved around as a whole, and it can be rotated as a whole, but there's nothing else that can change about it.
Now imagine two unit-length line segments. There are now six degrees of freedom: each segment needs two numbers to define its position, and one for its rotation.
But if you fasten them together at one end, that takes away two degrees of freedom. The position of the second line segment is now completely determined by the position and rotation of the first one (and the length of the first one, but we've said the segments can't stretch or shrink). So now we only need four numbers: the position of the first one, the rotation of the first one, and the rotation of the second one.
This turns out to be true in general: a joint between two segments, in this model, removes two degrees of freedom. If you want to join more than two segments at a single point, it fixes the position of each one, so a joint between $n$ segments removes $2\times(n-1)$ degrees of freedom. (You can imagine needing to push more pins through the same point to hold more bars in place.)
So now imagine a triangle. It's made up of three line segments (nine degrees of freedom), with three joints (removing six degrees of freedom). Three degrees of freedom remain, so the triangle is rigid.
Then imagine a square (or, more generally, any sort of quadrilateral). It's made up of four line segments (twelve degrees of freedom), with four joints (removing eight degrees of freedom). Four degrees of freedom remain, so it's not rigid: the additional degree of freedom is that it can flex and change its angles.
Finally, imagine adding another segment across the square, connecting two opposite corners together. This is an additional line segment (adding three more degrees of freedom), and two additional joints (removing four more degrees of freedom). This brings the total back down to three, so this structure is rigid.
(This particular explanation isn't at all formal, but this type of analysis can be made rigorous; you just need to be more careful in your definitions.)
A: The triangle is the only polygon that cannot change shape without changing the length of one or more of its sides. For all other polygons, the shape can change by merely changing four or more angles. For instance, a rectangle can become a parallelogram just by increasing two opposite angles and decreasing the other two angles.
A triangle can change shape by "breaking" one of its sides into two parts and making an angle with them (like putting a dent in the base of an equilateral triangle). This turns it into a quadrilateral... or maybe it was 4-sided before but two of the sides were in a straight line.,
But (and I know this is repeating) unless you change the length of one or more sides of a triangle, you cannot change its shape.
