Simple two-dimensional shapes can be described by basic geometry such as points, line, curves, plane, and so on. Shapes that occur in the physical world are often quite complex; they may be arbitrarily curved as studied by differential geometry, or fractal, as for plants or coastlines).
In geometry, two subsets of a Euclidean space have the same shape if one can be transformed to the other by a combination of translations, rotations (together also called rigid transformations), and uniform scalings. In other words, the shape of a set is all the geometrical information that is invariant to position (including rotation) and scale.
Having the same shape is an equivalence relation, and accordingly a precise mathematical definition of the notion of shape can be given as being an equivalence class of subsets of a Euclidean space having the same shape.
Shapes of physical objects are equal if the subsets of space these objects occupy satisfy the definition above. In particular, the shape does not depend on the size of the object nor on changes in orientation/direction. However, a mirror image could be called a different shape. Shape may change if the object is scaled non uniformly. For example, a sphere becomes an ellipsoid when scaled differently in the vertical and horizontal direction. In other words, preserving axes of symmetry (if they exist) is important for preserving shapes. Also, shape is not necessary determined by only the outer boundary of an object. For example, a solid ice cube and a second ice cube containing an inner cavity (air bubble) do not necessarily have the same shape, even though the outer boundary is identical.
Objects that can be transformed into each other only by rigid transformations and mirroring are congruent. An object is therefore congruent to its mirror image (even if it is not symmetric), but not to a scaled version. Objects that have the same shape or one has the same shape as the other's mirror image (or both if they are themselves symmetric) are called geometrically similar. Thus congruent objects are always geometrically similar, but geometrical similarity additionally allows uniform scaling.
A more flexible definition of shape takes into consideration the fact that we often deal with deformable shapes in reality (e.g. a person in different postures, a tree bending in the wind or a hand with different finger positions). By allowing also isometric (or near-isometric) deformations like bending, the intrinsic geometry of the object will stay the same, while subparts might be located at very different positions in space. This definition uses the fact, that geodesics (curves measured along the surface of the object) stay the same, independent of the isometric embedding. This means that the distance from a finger to a toe of a person measured along the body is always the same, no matter how the body is posed. An ant climbing a bendable plant will not notice how the wind moves it around, as only bending and no stretching is involved. It is true that when a body is bent, the wind moves around it, not through it.
Shape can also be more loosely defined as "the appearance of something, especially its outline". This definition is consistent with the above, in that the shape of a set does not depend on its position, size or orientation. However, it does not always imply an exact mathematical transformation. For example it is common to talk of star-shaped objects even though the number of points of the star is not defined.