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

# GLKMatrix3Subtract(_:_:)

Returns a new 3x3 matrix created by performing a component-wise subtraction of two matrices.

## Declaration

```swift
func GLKMatrix3Subtract(_ matrixLeft: GLKMatrix3, _ matrixRight: GLKMatrix3) -> GLKMatrix3
```

## Parameters

- `matrixLeft`: The starting matrix.
- `matrixRight`: The matrix to subtract.

## Return Value

Return Value A new matrix whose components each represent the difference between the components found in the same positions of the two source matrices.

## See Also

### Performing Mathematical Operations on Matrices

- [GLKMatrix3Invert(_:_:)](glkit/glkmatrix3invert(_:_:).md)
- [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)
