<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDValue/Matrix2d",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDValueV8Matrix2dV"
  },
  "title" : "USDValue.Matrix2d"
}
-->

# USDValue.Matrix2d

A 2x2 matrix of double-precision floating-point values.

```
@frozen struct Matrix2d
```

## Topics

### Initializers

[`init(Double, Double, Double, Double)`](/documentation/USDKit/USDValue/Matrix2d/init(_:_:_:_:))

Creates a matrix from individual element values in row-major order.

[`init(diagonal: Double)`](/documentation/USDKit/USDValue/Matrix2d/init(diagonal:))

Creates a diagonal matrix with `s` on the diagonal and zeros elsewhere.

### Subscripts

[`subscript(Int) -> USDValue.Matrix2d.VectorType`](/documentation/USDKit/USDValue/Matrix2d/subscript(_:))

Accesses the row at the specified index.

[`subscript(column _: Int) -> USDValue.Matrix2d.VectorType`](/documentation/USDKit/USDValue/Matrix2d/subscript(column:))

Accesses the column at the specified index.

### Type Aliases

[`typealias VectorType`](/documentation/USDKit/USDValue/Matrix2d/VectorType)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`MetadataValue`](/documentation/USDKit/USDStage/Object/MetadataValue)

[`Copyable`](/documentation/Swift/Copyable)

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

[`USDValueProtocol`](/documentation/USDKit/USDValueProtocol)

[`Value`](/documentation/USDKit/USDPrim/Attribute/Value)

---

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)