# System.Math.Vectors.TMatrix

Delphi

```  TMatrix = record
private
function Scale(const AFactor: Single): TMatrix;
public
class function CreateRotation(const AAngle: Single): TMatrix; static;
class function CreateScaling(const AScaleX, AScaleY: Single): TMatrix; static;
class function CreateTranslation(const ADeltaX, ADeltaY: Single): TMatrix; static;
class operator Multiply(const AMatrix1, AMatrix2: TMatrix): TMatrix;
class operator Multiply(const APoint: TPointF; const AMatrix: TMatrix): TPointF;
class operator Multiply(const AVector: TVector; const AMatrix: TMatrix): TVector;
class operator Multiply(const AVector: TPoint3D; const AMatrix: TMatrix): TPoint3D;
class operator Equal(const RightMatrix, LeftMatrix: TMatrix): Boolean; static;
function Determinant: Single;
function Inverse: TMatrix;
function ExtractScale: TPointF;
function EqualsTo(const AMatrix: TMatrix; const Epsilon: Single = TEpsilon.Matrix): Boolean;
case Integer of
0: (M: TMatrixArray;);
1: (m11, m12, m13: Single;
m21, m22, m23: Single;
m31, m32, m33: Single);
end;
```

C++

```struct DECLSPEC_DRECORD TMatrix
{
private:
TMatrix __fastcall Scale(const float AFactor);
public:
static TMatrix __fastcall CreateRotation(const float AAngle);
static TMatrix __fastcall CreateScaling(const float AScaleX, const float AScaleY);
static TMatrix __fastcall CreateTranslation(const float ADeltaX, const float ADeltaY);
static TMatrix __fastcall _op_Multiply(const TMatrix &AMatrix1, const TMatrix &AMatrix2);
TMatrix __fastcall operator*(const TMatrix& __rhs) { return TMatrix::_op_Multiply(*this, __rhs); };
static System::Types::TPointF __fastcall _op_Multiply(const System::Types::TPointF &APoint, const TMatrix &AMatrix);
static TVector __fastcall _op_Multiply(const TVector &AVector, const TMatrix &AMatrix);
static TPoint3D __fastcall _op_Multiply(const TPoint3D &AVector, const TMatrix &AMatrix);
static bool __fastcall _op_Equality(const TMatrix &RightMatrix, const TMatrix &LeftMatrix);
bool __fastcall operator==(const TMatrix& __rhs) { return TMatrix::_op_Equality(*this, __rhs); };
float __fastcall Determinant();
TMatrix __fastcall Inverse();
System::Types::TPointF __fastcall ExtractScale();
bool __fastcall EqualsTo(const TMatrix &AMatrix, const float Epsilon = 1.000000E-05f);
public:
union
{
struct
{
float m11;
float m12;
float m13;
float m21;
float m22;
float m23;
float m31;
float m32;
float m33;
};
struct
{
System::Math::Vectors::TMaxtrixArrayBase M;
};
};
};
```

#### Properties

Type Visibility Source Unit Parent
record
struct
public
System.Math.Vectors.pas
System.Math.Vectors.hpp
System.Math.Vectors System.Math.Vectors

## Description

TMatrix is an array of vectors in a two-dimensional space. It is used for vector transformations in 2D-space.

TMatrix is a record that represents three vectors, each in a two-dimensional space. The vectors have their initial points in (0, 0). `m11` and `m12` are the coordinates of the terminal point of the first vector (similar for the other two). The TMatrix is used for vector transformations in 2D-space.