> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_MinimumWidth

Returns the minimum width of a geometry, defined as the minimum distance between two parallel lines that enclose the geometry. This is the length of the shortest side of the rectangle returned by `ST_MinimumWidthRectangle`. For degenerate geometries like points and lines, the minimum width is 0.

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_MinimumWidth/ST_MinimumWidth.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=f6a31cfc0e3611d50bb3b1f27b94d5f7" alt="ST_MinimumWidth" width="500" height="300" data-path="images/sql-functions/ST_MinimumWidth/ST_MinimumWidth.svg" />

## Signatures

```sql theme={"system"}
ST_MinimumWidth(geom: Geometry)
```

## Parameters

<ParamField body="geom" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="Double">
  A numeric value.
</ResponseField>

## Example

For a right triangle (3-4-5), the minimum width is the altitude to the hypotenuse (\~2.57), which is narrower than the shortest side (3):

```sql theme={"system"}
SELECT ST_MinimumWidth(ST_GeomFromWKT('POLYGON ((0 0, 5 0, 0 3, 0 0))'))
```

```
2.5724786474424154
```
