What is the precise definition of a rigid shape? Wikipedia's section on rigid shapes does not appear to actually define what a rigid shape is. Rather it defines 'same shape' and 'rigid transformations' without giving any definitions of what is necessary and sufficient for a shape to be considered rigid.
For instance, I've seen the following image:

I understand intuitively why the triangle is rigid and quadrilateral is non-rigid. It is also my understanding that inserting a single diagonal connection into the quadrilateral would make the shape rigid? However, given the following image (labeling the shapes $S_1$, $S_2$ and $S_3$ in sequence left to right):

If $S_1$ had a single diagonal connection AB, it would be possible to flip ADB over axis q to obtain a shape similar to $S_2$ with the addition of connection AB (my explanation may not be the greatest). This shape is clearly not the same as $S_1$, so how can we say $S_1$ with a single diagonal connection CD is rigid? I feel I am unclear on what the definition of rigidity actually is.
 A: 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.
A: 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.
A: I believe that rigidity is used in a relatively intuitive way here. However, if I wanted to ignore any pretense of geometric purity and just try to define the concept in a way that works, I would do it like this: it seems like one needs to have a notion of a ''bottom'' edge, which we consider to be fixed. The others should be free to move, and in particular we want the preserved properties to be perimeter and area.  Therefore:

A shape is called rigid along an edge $e$ if any continuous function $f$ that fixes that edge and preserves geodesic distances, in fact preserves Euclidean distances as well (and area?).

Here, the concept of geodesic distances is difficult to formalize but easy to understand; it is simply the shortest distance between two points if one is restricted to traveling along the shape's edges. The Euclidean distance is a distance is just the length of the line in the plane connecting two points.
Under this definition $S_1$ is rigid along $AB$: the proposal of flipping across $AB$ is not allowed because although the geodesic distances have stayed the same, the distance between $C$ and $D$ has decreased
More thoughts:


*

*I doubt the continuous restriction is necessary, but non-continuous functions are scary and I didn't really want to think about them :) 

*I'm also not entirely convinced about area-preserving; this may actually be a strictly weaker condition than geodesic-preserving and Euclidean-preserving.

*It's possible that rigidity along any $e$ implies rigidity along every $e$. If not, you might want to define rigid shapes as those having rigidity along every $e$, depending on your motivations.

A: In two planar linkages, if j is the number of joints, L number of links, 
L = 2 j - 3. These lead to frames as rigid as a triangle. And in three dimensions, L = 3 j - 6.
If more than these many links are provided, parts of designed frame start moving as a mechanism with extra degrees of freedom.
