---
title: "matrix_from_rows(_:_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/matrix_from_rows(_:_:)-1w56v"
---

# matrix_from_rows(_:_:)

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

## Declaration

```swift
func matrix_from_rows(_ row0: SIMD2<Double>, _ row1: SIMD2<Double>) -> simd_double2x2
```

## See Also

### Matrix Creation Functions

- [simd_matrix(_:_:)](simd/simd_matrix(_:_:)-938tb.md)
- [simd_matrix_from_rows(_:_:)](simd/simd_matrix_from_rows(_:_:)-368td.md)
