<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GLKit",
  "identifier" : "/documentation/GLKit/GLKMatrix3Invert(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GLKit"
    ],
    "preciseIdentifier" : "c:@F@GLKMatrix3Invert"
  },
  "title" : "GLKMatrix3Invert(_:_:)"
}
-->

# GLKMatrix3Invert(_:_:)

Returns the inverse of a matrix.

```
func GLKMatrix3Invert(_ matrix: GLKMatrix3, _ isInvertible: UnsafeMutablePointer<Bool>!) -> GLKMatrix3
```

## Parameters

`matrix`

A matrix.

`isInvertible`

On return, this holds <doc://com.apple.documentation/documentation/Swift/true> if the matrix was inverted or <doc://com.apple.documentation/documentation/Swift/false> if the matrix is not invertible.

## Return Value

If `isInvertible` was set to <doc://com.apple.documentation/documentation/Swift/true>, this holds an inverted matrix. Otherwise, the identity matrix is returned.

---

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)