---
title: "Matrix Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Matrix.htm
product: "Graphics Mill"
---

# Matrix Class
 
Encapsulates a 3-by-3 affine matrix that represents a geometric transform.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class Matrix
```
 
## Remarks
  
The 3x3 matrix is used to apply geometry transformation on a 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: create a [new matrix](https://www.graphicsmill.com/docs/gm/C_Aurigma_GraphicsMill_Transforms_Matrix_ctor.htm.md) and then manually fill it using [Elements](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Matrix_Elements.htm.md) property, or generate it from points representing affine or projective transformation (see [CreateFromAffinePoints(PointF\[\], PointF\[\])](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_CreateFromAffinePoints_2_a6854ac1.htm.md) and [CreateFromProjectivePoints(PointF\[\], PointF\[\])](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_CreateFromProjectivePoints_2_a6854ac1.htm.md) methods for more details).
 
This class also implements some matrix algebraic operations, such as matrix inversion, multiplication, determinant calculation, and etc. Moreover you can apply affine operations at the matrix: rotate ([Rotate(Single)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_Rotate_1_7a94462e.htm.md) and [RotateAt(Single, PointF)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_RotateAt_2_222fde3b.htm.md) methods), scale ([Scale(Single, Single)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_Scale_2_427c5821.htm.md) method), and translate ([Translate(Single, Single)](https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Transforms_Matrix_Translate_2_427c5821.htm.md) method).
 
## Inheritance Hierarchy
  
- System.Object
    - Aurigma.GraphicsMill.Transforms.Matrix
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [Matrix Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_Matrix.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
