---
title: rotationMatrix
framework: coremotion
role: symbol
role_heading: Instance Property
path: coremotion/cmattitude/rotationmatrix
---

# rotationMatrix

Returns a rotation matrix representing the device’s attitude.

## Declaration

```swift
var rotationMatrix: CMRotationMatrix { get }
```

## Discussion

Discussion A rotation matrix in linear algebra describes the rotation of a body in three-dimensional Euclidean space.

## See Also

### Related Documentation

- [quaternion](coremotion/cmattitude/quaternion.md)

### Getting a Mathematical Representation of Attitude as a Rotation Matrix

- [CMRotationMatrix](coremotion/cmrotationmatrix.md)
