#### D.11.2.7 leftInverse

Procedure from library `control.lib` (see control_lib).

Usage:
  leftInverse(M); M a module

Return:
  module

Purpose:
  computes such a matrix L, that LM = Id;

Note:
  exists only in the case when M is free submodule

Example:

    LIB "control.lib";
    // a trivial example:
    ring r = 0,(x,z),dp;
    matrix M[2][1] = 1,x2z;
    print(M);
    ==> 1,
    ==> x2z
    print( leftInverse(M) );
    ==> 1,0
    kill r;
    // derived from the example TwoPendula:
    ring r=(0,m1,m2,M,g,L1,L2),Dt,dp;
    matrix U[3][1];
    U[1,1]=(-L2)*Dt^4+(g)*Dt^2;
    U[2,1]=(-L1)*Dt^4+(g)*Dt^2;
    U[3,1]=(L1*L2)*Dt^4+(-g*L1-g*L2)*Dt^2+(g^2);
    module M = module(U);
    module L = leftInverse(M);
    print(L);
    ==> (L1^2)/(g^2*L1-g^2*L2),(-L2^2)/(g^2*L1-g^2*L2),1/(g^2)
    // check
    print(matrix(L)*matrix(M));
    ==> 1

User manual for Singular version 4.4.1, 2025, generated by texi2html.