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

# GLKMatrix3GetMatrix2(_:)

Returns the upper-left 2x2 section of a 3x3 matrix.

## Declaration

```swift
func GLKMatrix3GetMatrix2(_ matrix: GLKMatrix3) -> GLKMatrix2
```

## Parameters

- `matrix`: A matrix.

## Return Value

Return Value A new 2x2 matrix.

## See Also

### Working With Parts of a Matrix

- [GLKMatrix3GetColumn(_:_:)](glkit/glkmatrix3getcolumn(_:_:).md)
- [GLKMatrix3GetRow(_:_:)](glkit/glkmatrix3getrow(_:_:).md)
- [GLKMatrix3SetColumn(_:_:_:)](glkit/glkmatrix3setcolumn(_:_:_:).md)
- [GLKMatrix3SetRow(_:_:_:)](glkit/glkmatrix3setrow(_:_:_:).md)
