---
title: "vuer.frame.to_mat"
section: "Python API"
order: 13
description: "Python API reference for vuer.frame.to_mat"
---

# vuer.frame.to_mat

## to_mat

```python
def to_mat(pos, quat)
```

[Source](https://github.com/vuer-ai/vuer-docs/blob/docs/v0.1.6/src/vuer/frame/to_mat.py#L4)

Convert a quaternion and position to a 4x4 transformation matrix.

:param quat: A list or numpy array of 4 elements [x, y, z, w] representing the quaternion
:param pos: A list or numpy array of 3 elements [x, y, z] representing the position
:return: A 4x4 numpy array representing the transformation matrix
