# Matrix4

`import { Matrix4 } from "destack:math";`

Four-by-four matrix in row-major field order.

```ds title="Matrix4"
export struct Matrix4<T: Numeric> {
    x: Vector4<T>;
    y: Vector4<T>;
    z: Vector4<T>;
    w: Vector4<T>;
}
```

[language/library/src/math/matrix.ds:35:47](https://github.com/destack-sh/destack/blob/main/language/library/src/math/matrix.ds#L35-L47)

## Members

### `x: Vector4<T>`

First row.

### `y: Vector4<T>`

Second row.

### `z: Vector4<T>`

Third row.

### `w: Vector4<T>`

Fourth row.
