---
title: "matrix4x4f::transformPosition"
framework: Compute Graph
role: symbol
role_heading: Function
platforms: [iOS 27.0+, iPadOS 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: computegraph/matrix4x4f/transformposition
---

# matrix4x4f::transformPosition

Transforms a position by a 4x4 matrix, including translation.

## Declaration

```swift
float3 matrix4x4f::transformPosition(float4x4 matrix, float3 position)
```

## Parameters

- `matrix`: The 4x4 transformation matrix to apply.
- `position`: The 3D position to transform.

## Return Value

Return Value The transformed 3D position.

## Discussion

Discussion Multiplies the position by the matrix with a w component of 1.0, so rotation, scale, and translation are all applied. This is appropriate for points in space that should be fully transformed by the matrix. note:
