public function rank() : int
    {
        $pivots = 0;

        foreach ($this->rref() as $row) {
            foreach ($row as $value) {
                if ($value != 0) {
                    $pivots++;

                    continue 2;
                }
            }
        }

        return $pivots;
    }