---
title: GLKMatrix4
framework: GLKit
role: collectionGroup
role_heading: API Collection
path: glkit/glkmatrix4-pce
---

# GLKMatrix4

## Overview

Overview The GLKMatrix4 type defines a 4x4 floating-point matrix as well as many mathematical operations commonly used to manipulate matrices. 3D graphics programming uses matrices extensively as a convenient way to represent a graphical transformation between different coordinate systems. These transformations include translation, scaling, rotation and projection; through matrix multiplication, multiple transformations can be concatenated into a single transformation matrix. The functions that manipulate GLKMatrix4 structures treat the inputs as immutable, instead returning a new matrix that represent the results of the operation.

## Topics

### Creating Matrices

- [GLKMatrix4Make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4make(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeAndTranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makeandtranspose(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeWithArray(_:)](glkit/glkmatrix4makewitharray(_:).md)
- [GLKMatrix4MakeWithArrayAndTranspose(_:)](glkit/glkmatrix4makewitharrayandtranspose(_:).md)
- [GLKMatrix4MakeWithColumns(_:_:_:_:)](glkit/glkmatrix4makewithcolumns(_:_:_:_:).md)
- [GLKMatrix4MakeWithRows(_:_:_:_:)](glkit/glkmatrix4makewithrows(_:_:_:_:).md)
- [GLKMatrix4MakeRotation(_:_:_:_:)](glkit/glkmatrix4makerotation(_:_:_:_:).md)
- [GLKMatrix4MakeXRotation(_:)](glkit/glkmatrix4makexrotation(_:).md)
- [GLKMatrix4MakeYRotation(_:)](glkit/glkmatrix4makeyrotation(_:).md)
- [GLKMatrix4MakeZRotation(_:)](glkit/glkmatrix4makezrotation(_:).md)
- [GLKMatrix4MakeWithQuaternion(_:)](glkit/glkmatrix4makewithquaternion(_:).md)
- [GLKMatrix4MakeScale(_:_:_:)](glkit/glkmatrix4makescale(_:_:_:).md)
- [GLKMatrix4MakeTranslation(_:_:_:)](glkit/glkmatrix4maketranslation(_:_:_:).md)
- [GLKMatrix4MakeLookAt(_:_:_:_:_:_:_:_:_:)](glkit/glkmatrix4makelookat(_:_:_:_:_:_:_:_:_:).md)
- [GLKMatrix4MakeOrtho(_:_:_:_:_:_:)](glkit/glkmatrix4makeortho(_:_:_:_:_:_:).md)
- [GLKMatrix4MakePerspective(_:_:_:_:)](glkit/glkmatrix4makeperspective(_:_:_:_:).md)
- [GLKMatrix4MakeFrustum(_:_:_:_:_:_:)](glkit/glkmatrix4makefrustum(_:_:_:_:_:_:).md)

### Working With Parts of a Matrix

- [GLKMatrix4GetMatrix2(_:)](glkit/glkmatrix4getmatrix2(_:).md)
- [GLKMatrix4GetMatrix3(_:)](glkit/glkmatrix4getmatrix3(_:).md)
- [GLKMatrix4GetColumn(_:_:)](glkit/glkmatrix4getcolumn(_:_:).md)
- [GLKMatrix4GetRow(_:_:)](glkit/glkmatrix4getrow(_:_:).md)
- [GLKMatrix4SetColumn(_:_:_:)](glkit/glkmatrix4setcolumn(_:_:_:).md)
- [GLKMatrix4SetRow(_:_:_:)](glkit/glkmatrix4setrow(_:_:_:).md)

### Performing Mathematical Operations on Matrices

- [GLKMatrix4Invert(_:_:)](glkit/glkmatrix4invert(_:_:).md)
- [GLKMatrix4Transpose(_:)](glkit/glkmatrix4transpose(_:).md)
- [GLKMatrix4InvertAndTranspose(_:_:)](glkit/glkmatrix4invertandtranspose(_:_:).md)
- [GLKMatrix4Multiply(_:_:)](glkit/glkmatrix4multiply(_:_:).md)
- [GLKMatrix4Rotate(_:_:_:_:_:)](glkit/glkmatrix4rotate(_:_:_:_:_:).md)
- [GLKMatrix4RotateWithVector3(_:_:_:)](glkit/glkmatrix4rotatewithvector3(_:_:_:).md)
- [GLKMatrix4RotateWithVector4(_:_:_:)](glkit/glkmatrix4rotatewithvector4(_:_:_:).md)
- [GLKMatrix4RotateX(_:_:)](glkit/glkmatrix4rotatex(_:_:).md)
- [GLKMatrix4RotateY(_:_:)](glkit/glkmatrix4rotatey(_:_:).md)
- [GLKMatrix4RotateZ(_:_:)](glkit/glkmatrix4rotatez(_:_:).md)
- [GLKMatrix4Scale(_:_:_:_:)](glkit/glkmatrix4scale(_:_:_:_:).md)
- [GLKMatrix4ScaleWithVector3(_:_:)](glkit/glkmatrix4scalewithvector3(_:_:).md)
- [GLKMatrix4ScaleWithVector4(_:_:)](glkit/glkmatrix4scalewithvector4(_:_:).md)
- [GLKMatrix4Translate(_:_:_:_:)](glkit/glkmatrix4translate(_:_:_:_:).md)
- [GLKMatrix4TranslateWithVector3(_:_:)](glkit/glkmatrix4translatewithvector3(_:_:).md)
- [GLKMatrix4TranslateWithVector4(_:_:)](glkit/glkmatrix4translatewithvector4(_:_:).md)
- [GLKMatrix4Add(_:_:)](glkit/glkmatrix4add(_:_:).md)
- [GLKMatrix4Subtract(_:_:)](glkit/glkmatrix4subtract(_:_:).md)

### Performing Mathematical Operations on Vectors

- [GLKMatrix4MultiplyVector3(_:_:)](glkit/glkmatrix4multiplyvector3(_:_:).md)
- [GLKMatrix4MultiplyVector3Array(_:_:_:)](glkit/glkmatrix4multiplyvector3array(_:_:_:).md)
- [GLKMatrix4MultiplyVector3WithTranslation(_:_:)](glkit/glkmatrix4multiplyvector3withtranslation(_:_:).md)
- [GLKMatrix4MultiplyVector3ArrayWithTranslation(_:_:_:)](glkit/glkmatrix4multiplyvector3arraywithtranslation(_:_:_:).md)
- [GLKMatrix4MultiplyVector4(_:_:)](glkit/glkmatrix4multiplyvector4(_:_:).md)
- [GLKMatrix4MultiplyVector4Array(_:_:_:)](glkit/glkmatrix4multiplyvector4array(_:_:_:).md)
- [GLKMatrix4MultiplyAndProjectVector3(_:_:)](glkit/glkmatrix4multiplyandprojectvector3(_:_:).md)
- [GLKMatrix4MultiplyAndProjectVector3Array(_:_:_:)](glkit/glkmatrix4multiplyandprojectvector3array(_:_:_:).md)

### Data Types

- [GLKMatrix4](glkit/glkmatrix4.md)

### Constants

- [GLKMatrix4Identity](glkit/glkmatrix4identity.md)

## See Also

### Math Utilties

- [GLKMatrixStack](glkit/glkmatrixstack.md)
- [GLKMatrix3](glkit/glkmatrix3-pcl.md)
- [GLKVector2](glkit/glkvector2-pbj.md)
- [GLKVector3](glkit/glkvector3-pbt.md)
- [GLKVector4](glkit/glkvector4-pbk.md)
- [GLKQuaternion](glkit/glkquaternion-pc6.md)
- [GLKit Math Utilities](glkit/glkit-math-utilities.md)
