---
title: "Matrix Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Matrix Class
 
This class represents a 3x3 matrix.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public NotInheritable Class Matrix _Inherits LockableObject
```
 
```csharp
public sealed class Matrix : LockableObject
```
 
## Remarks
  
3x3 matrix is used to apply geometry transformation of the bitmap. Geometry transformation can be both affine (such as scale, skew or rotate) and projective (such as perspective correction).
 
You can create this class instance in two ways: either create [new matrix](https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Transforms_Matrix_ctor.htm.md) and then fill it using [FillFromProjectivePoints(PointF\[\], PointF\[\])](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_FillFromProjectivePoints_2_a6854ac1.htm.md) property, or generate it from points representing affine or projective transformation (see [FromAffinePoints(PointF\[\], PointF\[\])](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_FromAffinePoints_2_a6854ac1.htm.md) and [FromProjectivePoints(PointF\[\], PointF\[\])](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_FromProjectivePoints_2_a6854ac1.htm.md) methods for more details).
 
This class also implements some matrix algebraic operations, such as matrix inversion ([Invert()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_Invert.htm.md) method), multiplication ([Multiply(Matrix)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_Multiply_1_05ab20fe.htm.md) method), determinant calculation ([Determinant](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Matrix_Determinant.htm.md) property). Also, you can apply affine operations at the matrix: rotate ([Rotate(Single)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_Rotate_1_7a94462e.htm.md) and [RotateAt(Single, PointF)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_RotateAt_2_222fde3b.htm.md) methods), scale ([Scale(Single, Single)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_Scale_2_427c5821.htm.md) method), and translate ([Translate(Single, Single)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Transforms_Matrix_Translate_2_427c5821.htm.md) method).
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.LockableObject](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_LockableObject.htm.md)
        - Aurigma.GraphicsMill.Transforms.Matrix
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_28.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_29.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_30.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_31.png)
  
## See Also

### Reference

- [Matrix Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
