<!--
{
  "availability" : [

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

# simd_half4x4

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

```
struct simd_half4x4
```

## Topics

### Initializers

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

Creates a new matrix with uninitialized memory.

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

Creates a new matrix with the specified columns.

### Matrix properties

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

The columns of the matrix.

### Matrix constants

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

A 4 x 4 identity matrix.

### Matrix creation functions

[`simd_matrix(_:_:_:_:)`](/documentation/simd/simd_matrix(_:_:_:_:)-7ltt0)

Returns a new matrix with the specified columns.

[`simd_matrix_from_rows(_:_:_:_:)`](/documentation/simd/simd_matrix_from_rows(_:_:_:_:)-31gpp)

Returns a new matrix with the specified rows.

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

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

### Math functions

[`simd_add`](/documentation/simd/simd_add-436ij)

Returns the sum of two matrices.

[`simd_sub`](/documentation/simd/simd_sub-5jbjv)

Returns the difference of two matrices.

### Matrix-scalar multiplication functions

[`matrix_scale`](/documentation/simd/matrix_scale-ltd4)

Returns the product of a scalar value and a matrix.

### Equality functions

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

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-9gmpl)

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-5kt4x)

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-4smx3)

Returns the determinant of the specified matrix.

[`simd_inverse`](/documentation/simd/simd_inverse-4dsqu)

Returns the inverse of the specified matrix.

### Linear combination function

[`simd_linear_combination`](/documentation/simd/simd_linear_combination-8upzt)

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

### Transpose function

[`simd_transpose`](/documentation/simd/simd_transpose-4uhs6)

Returns the transpose of a 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)