# Matrix Matrix Matrix Matrix Constructors

## Definition

### In this article

## Overloads

Matrix() Matrix() Matrix() |
Initializes a new instance of the Matrix class as the identity matrix. |

Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[]) |
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points. |

Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[]) |
Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points. |

Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single) |
Initializes a new instance of the Matrix class with the specified elements. |

## Matrix() Matrix() Matrix()

Initializes a new instance of the Matrix class as the identity matrix.

```
public:
Matrix();
```

`public Matrix ();`

`Public Sub New ()`

## Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[]) Matrix(Rectangle, Point[])

Initializes a new instance of the Matrix class to the geometric transform defined by the specified rectangle and array of points.

```
public:
Matrix(System::Drawing::Rectangle rect, cli::array <System::Drawing::Point> ^ plgpts);
```

`public Matrix (System.Drawing.Rectangle rect, System.Drawing.Point[] plgpts);`

`new System.Drawing.Drawing2D.Matrix : System.Drawing.Rectangle * System.Drawing.Point[] -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (rect As Rectangle, plgpts As Point())`

#### Parameters

A Rectangle structure that represents the rectangle to be transformed.

- plgpts
- Point[]

An array of three Point structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners.

### Remarks

This method initializes the new Matrix such that it represents the geometric transform that maps the rectangle specified by the `rect`

parameter to the parallelogram defined by the three points in the `plgpts`

parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts`

array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.

## Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[]) Matrix(RectangleF, PointF[])

```
public:
Matrix(System::Drawing::RectangleF rect, cli::array <System::Drawing::PointF> ^ plgpts);
```

`public Matrix (System.Drawing.RectangleF rect, System.Drawing.PointF[] plgpts);`

`new System.Drawing.Drawing2D.Matrix : System.Drawing.RectangleF * System.Drawing.PointF[] -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (rect As RectangleF, plgpts As PointF())`

#### Parameters

A RectangleF structure that represents the rectangle to be transformed.

- plgpts
- PointF[]

An array of three PointF structures that represents the points of a parallelogram to which the upper-left, upper-right, and lower-left corners of the rectangle is to be transformed. The lower-right corner of the parallelogram is implied by the first three corners.

### Remarks

This method initializes the new Matrix such that it represents the geometric transform that maps the rectangle specified by the `rect`

parameter to the parallelogram defined by the three points in the `plgpts`

parameter. The upper-left corner of the rectangle is mapped to the first point in the `plgpts`

array, the upper-right corner is mapped to the second point, and the lower-left corner is mapped to the third point. The lower-right point of the parallelogram is implied by the first three.

## Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single) Matrix(Single, Single, Single, Single, Single, Single)

Initializes a new instance of the Matrix class with the specified elements.

```
public:
Matrix(float m11, float m12, float m21, float m22, float dx, float dy);
```

`public Matrix (float m11, float m12, float m21, float m22, float dx, float dy);`

`new System.Drawing.Drawing2D.Matrix : single * single * single * single * single * single -> System.Drawing.Drawing2D.Matrix`

`Public Sub New (m11 As Single, m12 As Single, m21 As Single, m22 As Single, dx As Single, dy As Single)`