The first_minor() is an inbuilt method in Ruby returns the submatrix after removing the specified row and column.
Syntax: mat1.first_minor(row_num, col_num)
Parameters: The function needs the row number and column number which are to be removed
Return Value: It returns the submatrix after removal.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.