---
title: "GLKMatrix3Invert(_:_:)"
framework: GLKit
role: symbol
role_heading: Function
platforms: [iOS 5.0+, iPadOS 5.0+, macOS 10.8+, tvOS 9.0+]
path: "glkit/glkmatrix3invert(_:_:)"
---

# GLKMatrix3Invert(_:_:)

Returns the inverse of a matrix.

## Declaration

```swift
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

Return Value If isInvertible was set to true, this holds an inverted matrix. Otherwise, the identity matrix is returned.

## See Also

### Performing Mathematical Operations on Matrices

- [GLKMatrix3Transpose(_:)](glkit/glkmatrix3transpose(_:).md)
- [GLKMatrix3InvertAndTranspose(_:_:)](glkit/glkmatrix3invertandtranspose(_:_:).md)
- [GLKMatrix3Multiply(_:_:)](glkit/glkmatrix3multiply(_:_:).md)
- [GLKMatrix3Rotate(_:_:_:_:_:)](glkit/glkmatrix3rotate(_:_:_:_:_:).md)
- [GLKMatrix3RotateWithVector3(_:_:_:)](glkit/glkmatrix3rotatewithvector3(_:_:_:).md)
- [GLKMatrix3RotateWithVector4(_:_:_:)](glkit/glkmatrix3rotatewithvector4(_:_:_:).md)
- [GLKMatrix3RotateX(_:_:)](glkit/glkmatrix3rotatex(_:_:).md)
- [GLKMatrix3RotateY(_:_:)](glkit/glkmatrix3rotatey(_:_:).md)
- [GLKMatrix3RotateZ(_:_:)](glkit/glkmatrix3rotatez(_:_:).md)
- [GLKMatrix3Scale(_:_:_:_:)](glkit/glkmatrix3scale(_:_:_:_:).md)
- [GLKMatrix3ScaleWithVector3(_:_:)](glkit/glkmatrix3scalewithvector3(_:_:).md)
- [GLKMatrix3ScaleWithVector4(_:_:)](glkit/glkmatrix3scalewithvector4(_:_:).md)
- [GLKMatrix3Add(_:_:)](glkit/glkmatrix3add(_:_:).md)
- [GLKMatrix3Subtract(_:_:)](glkit/glkmatrix3subtract(_:_:).md)
