<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/simd_float4x4",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "c:@SA@simd_float4x4"
  },
  "title" : "simd_float4x4"
}
-->

# simd_float4x4

A matrix of four columns and four rows that contains single-precision values.

```
struct simd_float4x4
```

## Topics

### Initializers

[`init()`](/documentation/simd/simd_float4x4/init())

Creates a new matrix with uninitialized memory.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-6pc85)

Creates a new matrix with the specified scalar value on the main diagonal.

[`init(diagonal:)`](/documentation/simd/simd_float4x4/init(diagonal:))

Creates a new matrix with the specified vector on the main diagonal.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-50sjs)

Creates a new matrix with the specified columns.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-7ig5g)

Creates a new matrix from the specified quaternion.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-4jrbw)

Creates a new matrix from the specified SceneKit matrix.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-q9z6)

Creates a new matrix from the specified SceneKit matrix.

[`init(_:_:_:_:)`](/documentation/simd/simd_float4x4/init(_:_:_:_:))

Creates a new matrix with the specified vectors as columns.

[`init(columns:)`](/documentation/simd/simd_float4x4/init(columns:))

Creates a new matrix with the specified columns.

[`init(rows:)`](/documentation/simd/simd_float4x4/init(rows:))

Creates a new matrix with the specified rows.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-3op4b)

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-9txnb)

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-77vxr)

[`init(affineTransform:)`](/documentation/simd/simd_float4x4/init(affineTransform:))

[`init(pose:)`](/documentation/simd/simd_float4x4/init(pose:))

[`init(projectiveTransform:)`](/documentation/simd/simd_float4x4/init(projectiveTransform:))

### Matrix Constants

[`matrix_identity_float4x4`](/documentation/simd/matrix_identity_float4x4)

A 4 x 4 identity matrix.

### Matrix Properties

[`determinant`](/documentation/simd/simd_float4x4/determinant)

The determinant of the matrix.

[`inverse`](/documentation/simd/simd_float4x4/inverse)

The inverse of the matrix.

[`transpose`](/documentation/simd/simd_float4x4/transpose)

The transpose of the matrix.

[`columns`](/documentation/simd/simd_float4x4/columns)

The columns of the matrix.

### Matrix Creation Functions

[`simd_matrix(_:_:_:_:)`](/documentation/simd/simd_matrix(_:_:_:_:)-4p5ox)

Returns a new matrix with the specified columns.

[`simd_matrix_from_rows(_:_:_:_:)`](/documentation/simd/simd_matrix_from_rows(_:_:_:_:)-34hac)

Returns a new matrix with the specified rows.

[`matrix_from_rows(_:_:_:_:)`](/documentation/simd/matrix_from_rows(_:_:_:_:)-18jb3)

Returns a new matrix with the specified rows.

[`simd_diagonal_matrix`](/documentation/simd/simd_diagonal_matrix-2l0e4)

Returns a new matrix with the specified vector on the main diagonal.

[`simd_matrix4x4(_:)`](/documentation/simd/simd_matrix4x4(_:)-20lv7)

Returns a new matrix with the specified quarternion.

### Math Functions

[`simd_add`](/documentation/simd/simd_add-8hvd)

Returns the sum of two matrices.

[`simd_sub`](/documentation/simd/simd_sub-bfqo)

Returns the difference of two matrices.

[`matrix_scale`](/documentation/simd/matrix_scale-197rd)

Returns the product of a scalar value and a matrix.

### Matrix-Scalar Multiplication Functions

[`simd_mul`](/documentation/simd/simd_mul-7dgim)

Returns the product of a scalar value and a 4 x 4 matrix.

### Matrix-Vector Multiplication Functions

[`simd_mul`](/documentation/simd/simd_mul-78xlj)

Returns the product of a four-element vector and a 4 x 4 matrix.

[`matrix_multiply`](/documentation/simd/matrix_multiply-43zat)

Returns the product of a four-element vector and a 4 x 4 matrix.

[`simd_mul`](/documentation/simd/simd_mul-781du)

Returns the product of a 4 x 4 matrix and a four-element vector.

[`matrix_multiply`](/documentation/simd/matrix_multiply-1q25o)

Returns the product of a 4 x 4 matrix and a four-element vector.

### Matrix-Matrix Multiplication Functions

[`simd_mul`](/documentation/simd/simd_mul-904fl)

Returns the product of a 2 x 4 matrix and a 4 x 2 matrix.

[`matrix_multiply`](/documentation/simd/matrix_multiply-93c5i)

Returns the product of a 2 x 4 matrix and a 4 x 2 matrix.

[`matrix_multiply`](/documentation/simd/matrix_multiply-7g81z)

Returns the product of a 3 x 4 matrix and a 4 x 3 matrix.

[`simd_mul`](/documentation/simd/simd_mul-6xfmy)

Returns the product of a 3 x 4 matrix and a 4 x 3 matrix.

[`matrix_multiply`](/documentation/simd/matrix_multiply-7hosa)

Returns the product of a 4 x 4 matrix and a 4 x 4 matrix.

[`simd_mul`](/documentation/simd/simd_mul-1sxjd)

Returns the product of a 4 x 4 matrix and a 4 x 4 matrix.

### Equality Functions

[`simd_equal`](/documentation/simd/simd_equal-cge0)

Returns true if every element in a matrix is exactly equal to the corresponding element in a second matrix.

[`simd_almost_equal_elements`](/documentation/simd/simd_almost_equal_elements-9kkrw)

Returns true if every element in a matrix is within a specified tolerance to the corresponding element in a second matrix.

[`simd_almost_equal_elements_relative`](/documentation/simd/simd_almost_equal_elements_relative-8f55s)

Returns true if every element in a matrix is within a specified single-precision relative tolerance to the corresponding element in a second matrix.

### Determinant and Inverse Functions

[`simd_determinant`](/documentation/simd/simd_determinant-358zf)

Returns the determinant of the specified matrix.

[`simd_inverse`](/documentation/simd/simd_inverse-3h6ry)

Returns the inverse of the specified matrix.

### Linear Combination Function

[`simd_linear_combination`](/documentation/simd/simd_linear_combination-4bbf)

Returns the linear combination of two scalar values and two matrices.

### Transpose Function

[`simd_transpose`](/documentation/simd/simd_transpose-7h97b)

Returns the transpose of a matrix.

### Element Access

[`subscript(_:)`](/documentation/simd/simd_float4x4/subscript(_:))

Accesses the column at the specified position.

[`subscript(_:_:)`](/documentation/simd/simd_float4x4/subscript(_:_:))

Accesses the element at the specified position.

### Type Aliases

[`float4x4`](/documentation/simd/float4x4)

A type alias for a single-precision 4 x 4 matrix.

[`matrix_float4x4`](/documentation/simd/matrix_float4x4)

A type alias for a single-precision 4 x 4 matrix.

### Deprecated Symbols

[`matrix_invert(_:)`](/documentation/simd/matrix_invert(_:)-7fevy)

Returns the inverse of the specified matrix.

[`matrix_from_diagonal(_:)`](/documentation/simd/matrix_from_diagonal(_:)-71pds)

Returns a new matrix with the specified vector on the main diagonal.

[`matrix_determinant(_:)`](/documentation/simd/matrix_determinant(_:)-4yqoy)

Returns the determinant of the specified matrix.

[`matrix_equal(_:_:)`](/documentation/simd/matrix_equal(_:_:)-752xl)

Returns true if every element in a matrix is exactly equal to the corresponding element in a second matrix, and otherwise returns false.

[`matrix_from_columns(_:_:_:_:)`](/documentation/simd/matrix_from_columns(_:_:_:_:)-5d0yw)

Returns a new matrix with the specified columns.

[`matrix_transpose(_:)`](/documentation/simd/matrix_transpose(_:)-8t44c)

Returns the transpose of a matrix.

[`cmatrix`](/documentation/simd/simd_float4x4/cmatrix)

Returns the matrix as the corresponding C matrix type.

[`init(_:)`](/documentation/simd/simd_float4x4/init(_:)-2ga0f)

Creates a new matrix with the specified matrix.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)