# row() Function & Examples

Use the row() matrix function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## row

#### row(x, index)

Try it yourself:

```calculio
A = [[1, 2], [3, 4]]
row(A, 1)
row(A, 2)
```

[column](https://calcul.io/function/column/index.md)

---

## row(): Extracting a Matrix Row

**row()** extracts a specified row from a matrix. It is useful for selecting one observation, equation, or record while preserving its column values.

## Index and shape checks

Ensure the requested index exists; indexing conventions should be verified in your expression context. Use [size()](https://calcul.io/function/size/index.md) to find the matrix dimensions and [column()](https://calcul.io/function/column/index.md) when selecting a vertical slice instead.

After extraction, use [dot()](https://calcul.io/function/dot/index.md) for vector calculations or [sum()](https://calcul.io/function/sum/index.md) for a row total. For modifying rather than selecting data, use [subset()](https://calcul.io/function/subset/index.md) with explicit indices.

[All functions](https://calcul.io/functions/index.md)
