Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
public static function MINVERSE($matrixValues)
    {
        $matrixData = [];
        if (!is_array($matrixValues)) {
            $matrixValues = [[$matrixValues]];
        }

        $row = $maxColumn = 0;
        foreach ($matrixValues as $matrixRow) {
            if (!is_array($matrixRow)) {
                $matrixRow = [$matrixRow];
            }
            $column = 0;
            foreach ($matrixRow as $matrixCell) {
                if ((is_string($matrixCell)) || ($matrixCell === null)) {
                    return Functions::VALUE();
                }
                $matrixData[$column][$row] = $matrixCell;
                ++$column;
            }
            if ($column > $maxColumn) {
                $maxColumn = $column;
            }
            ++$row;
        }
        foreach ($matrixValues as $matrixRow) {
            if (count($matrixRow) != $maxColumn) {
                return Functions::VALUE();
            }
        }

        try {
            $matrix = new Matrix($matrixData);

            return $matrix->inverse()->getArray();
        } catch (PhpSpreadsheetException $ex) {
            return Functions::VALUE();
        }
    }
public static function MINVERSE($matrixValues)
    {
        $matrixData = [];
        if (!is_array($matrixValues)) {
            $matrixValues = [[$matrixValues]];
        }

        $row = $maxColumn = 0;
        foreach ($matrixValues as $matrixRow) {
            if (!is_array($matrixRow)) {
                $matrixRow = [$matrixRow];
            }
            $column = 0;
            foreach ($matrixRow as $matrixCell) {
                if ((is_string($matrixCell)) || ($matrixCell === null)) {
                    return Functions::VALUE();
                }
                $matrixData[$column][$row] = $matrixCell;
                ++$column;
            }
            if ($column > $maxColumn) {
                $maxColumn = $column;
            }
            ++$row;
        }
        foreach ($matrixValues as $matrixRow) {
            if (count($matrixRow) != $maxColumn) {
                return Functions::VALUE();
            }
        }

        try {
            $matrix = new Matrix($matrixData);

            return $matrix->inverse()->getArray();
        } catch (PhpSpreadsheetException $ex) {
            return Functions::VALUE();
        }
    }
MINVERSE.

Returns the inverse matrix for the matrix stored in an array.

Excel Function:
MINVERSE(array)

@category Mathematical and Trigonometric Functions

@param array $matrixValues A matrix of values

@return array