<!--
{
  "availability" : [

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

# simd_double2x4

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

```
struct simd_double2x4
```

## Topics

### Initializers

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

Creates a new matrix with uninitialized memory.

[`init(_:)`](/documentation/simd/simd_double2x4/init(_:)-71dee)

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

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

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

[`init(_:)`](/documentation/simd/simd_double2x4/init(_:)-6lqav)

Creates a new matrix from an array.

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

Creates a new matrix with the specified vectors as columns.

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

Creates a new matrix with the specified columns.

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

Creates a new matrix with the specified rows.

### Matrix Properties

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

The transpose of the matrix.

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

The columns of the matrix.

### Matrix Creation Functions

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

Returns a new matrix with the specified columns.

[`simd_matrix_from_rows(_:_:_:_:)`](/documentation/simd/simd_matrix_from_rows(_:_:_:_:)-851r7)

Returns a new matrix with the specified rows.

[`matrix_from_rows(_:_:_:_:)`](/documentation/simd/matrix_from_rows(_:_:_:_:)-897qw)

Returns a new matrix with the specified rows.

### Math Functions

[`simd_add`](/documentation/simd/simd_add-1e1xc)

Returns the sum of two matrices.

[`simd_sub`](/documentation/simd/simd_sub-75iiq)

Returns the difference of two matrices.

[`matrix_scale`](/documentation/simd/matrix_scale-1fgte)

Returns the product of a scalar value and a matrix.

### Matrix-Scalar Multiplication Functions

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

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

### Matrix-Vector Multiplication Functions

[`simd_mul`](/documentation/simd/simd_mul-43dfj)

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

[`matrix_multiply`](/documentation/simd/matrix_multiply-4dr8s)

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

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

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

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

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

### Matrix-Matrix Multiplication Functions

[`simd_mul`](/documentation/simd/simd_mul-3mmg5)

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

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

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

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

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

[`matrix_multiply`](/documentation/simd/matrix_multiply-tcz1)

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

[`simd_mul`](/documentation/simd/simd_mul-63k1v)

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

[`matrix_multiply`](/documentation/simd/matrix_multiply-30ogt)

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

### Equality Functions

[`simd_equal`](/documentation/simd/simd_equal-3xz83)

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-59py1)

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-8187e)

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

### Linear Combination Function

[`simd_linear_combination`](/documentation/simd/simd_linear_combination-gtsr)

### Transpose Function

[`simd_transpose`](/documentation/simd/simd_transpose-847r1)

### Element Access

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

Accesses the column at the specified position.

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

Accesses the element at the specified position.

### Type Aliases

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

A type alias for a double-precision 2 x 4 matrix.

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

A type alias for a double-precision 2 x 4 matrix.

### Deprecated Symbols

[`matrix_equal(_:_:)`](/documentation/simd/matrix_equal(_:_:)-1dcgx)

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(_:_:)-9q8xb)

Returns a new matrix with the specified columns.

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

Returns the transpose of a matrix.

[`init(_:)`](/documentation/simd/simd_double2x4/init(_:)-6ssjo)

Creates a new matrix with the specified matrix.

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

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)