What is the precise definition of a rigid shape?

Although the accepted answer by rschwieb is an excellent one, I think there is a connection between the mathematical notion of "rigid motion" and the physical notion of "structural rigidity" that has not been mentioned yet.

Let us define a diagram to refer to any finite collection of line segments with labeled endpoints in the plane. Suppose we have two kinds of data about a given diagram: its incidence relations (i.e. knowing which points are the endpoints of which which line segments) and its linear measurements (i.e. knowing how long the segments are). We ask the question:

Is a diagram completely specified by its incidence relations and its linear measurements?

Another (slightly less formal) way to put this is: If you know how long all the segments in a diagram are, can you draw the diagram?

First, let's notice that at best we might be able to say that a diagram is completely specified up to a rigid motion. That is, even if could reconstruct a diagram from its incidence relations and linear measurements, we would not know where to position it in the plane or how to orient it, because a rigid motion of the plane preserves all incidence and metric properties while possibly changing position and orientation.

But a more significant observation is that knowing the incidence relations and linear measurements of a diagram does not, in general, completely specify a diagram. To see this, just look at the example in the OP of a "nonrigid" shape: A square that deforms into a rhombus. The original diagram (the square) and the deformed diagram (the rhombus) have exactly the same incidence relationships and linear measurements, but the angles in them are different.

We can take this as a mathematical characterization of the physical notion of "structural rigidity": If a diagram is completely determined (up to a rigid motion) by its incidence relations and its linear measurements, we can call it a rigid diagram.

Now consider a triangle. Suppose we know the three side-lengths of a given triangle $\Delta ABC$. Is it possible to reconstruct everything else about the triangle?

The answer is Yes. This is known as the Side-Side-Side property. In high school geometry it is usually formulated as a criterion for proving that two triangles are congruent:

If $\Delta ABC$ and $\Delta PQR$ are two triangles with $AB=PQ,BC=QR,$ and $AC=PR$, then $\Delta ABC \cong \Delta PQR$.

The Side-Side-Side property tells you that if the sides of a triangle are non-deformable then its angles are completely "locked in", i.e. the entire triangle is rigid.

Note that this is not true for any polygon other than a triangle: There is no such thing as a "Side-Side-Side-Side" congruence criterion for quadrilaterals.

Now let's consider the examples in the OP. The diagram $S_1$, without the dotted diagonals, is a quadrilateral $ADBC$. Such a quadrilateral is not rigid, because one can draw another quadrilateral $A'D'B'C'$ with all corresponding lengths exactly the same but with different interior angles.

However, if you add even one of the dotted segments (for example, $\overline{DC}$) into the diagram, then the diagram would be rigid, because the triangles $\Delta ADC$ and $\Delta BDC$ are rigid.

Exactly the same remarks apply to $S_2$.

For $S_3$, the question of whether or not the diagram is rigid depends on whether the line that appears to join $A$ to $C$ and the line that appears to join $B$ to $D$ is actually a segment, and if so whether the point that appears to be at the intersection of those segments (call it $P$) is explicitly part of the diagram or not, and whether $\overline{AP}$, $\overline{PC}$, etc. are all part of the diagram. (Notice that this is all contained in the "incidence relations" specification of a diagram.) If they are, then the diagram is rigid; otherwise, it is just a non-rigid quadrilateral.


The reason you are finding these ideas hard to reconcile is because the diagram is referring to a physical notion of rigidity, while the wiki page you're reading is centered around a geometrical notion of rigidity. (I don't find the article you linked to be particularly clearly written either.)

Geometry

In geometry, we don't talk about rigid shapes really, we talk about rigid transformations. Shapes in geometry are just sets of points, not physical objects with resistance to bending and stretching. They are at the mercy of transformations applied to them.

Assuming we are working in a geometry that has notions of how to measure angles and distances:

A rigid transformation preserves all distances and angle measures (and depending on your taste, orientation too)

The idea is that no matter what shape we start out with, any shape you draw in the plane at all will look the same after a rigid transformation is applied, except that its location and situation might be different from what it used to be. (It might also be its mirror image, if you have allowed transformations to flip the orientation of the plane.)

Many of those shapes would be changed if we picked a nonrigid transformation, for example, the transformation given by $x\mapsto x$ and $y\mapsto 2y$ in the Cartesian plane. This would change a circle at the origin into an ellipse.

If you are interested in geometry that is not founded upon distance, then you can adopt some geometry axioms that assume notions of congruence of segments and angles. Rigid transformations of the plane would then be ones which do not disturb segment congruence nor angle congruence.

Physics

Now, there is a notion of rigidity in reality that has more to do with its resistance to changing shape. This is called structural rigidity. This is really not the same animal as rigidity of shape in geometry, although it's obviously related.

In the diagram you supplied, the point seems to be that we are assuming the segments do not change length, but that the joints are on hinges. You are able to apply physical forces to both, and see how they behave. One would classify the triangle as a rigid shape because none of its edgelengths or angles would change because of the intrinsic shape of the object. The square on the other hand isn't geometrically limited to having 90 degree angles when you apply pressure to it, so it can change into a rhombus rather quickly.

Moreover, you could easily imagine building an object with length changing segments and rigid hinges, so that a square could be pulled into a rectangle, but not pushed over into a rhombus. I don't think that object would be considered "rigid" either.

Conclusion

Hopefully I've expressed a bit about the difference between these two studies.

I don't mean to say that the physics notion is totally disjoint from mathematics: for sure physical rigidity can be analyzed with mathematics. It's just that the wiki page on geometry was not where you wanted be if you're interested in structural rigidity.