You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > Inv Method > Matrix.Inv Method ()
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.Inv Method ()

Calculates matrix inverse (Mtx^-1).

Pascal
function Inv: TMtx; overload;

Calculate the inverse (Mtx^-1) of the calling matrix. If the calling matrix is not Quadratic, an exception is raised. Parameter TMtxType determines which optimized method will be used for calculating the inverse matrix. If MtxType is omitted, the default value mtGeneral (general quadratic matrix) is used.

The MtxType parameter is not verified. To determine if the calling matrix type is actually MtxType, use the DetectMtxType method.

var A: Matrix; begin A.SetIt(2,2,False,[1,2, 2,4]); // 2x2, real matrix A.Inv; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!