# The Implementation of Recursive Algorithm to Determine the Determinant of n x n Matrix Using Cofactor Expansion

• Rahmat Hidayat Universitas Islam Negeri Sunan Kalijaga
• Seto Rahardyanto Universitas Islam Negeri Sunan Kalijaga
• Pahlevi Wahyu Hardjita Universitas Islam Negeri Sunan Kalijaga
Keywords: Algorithm,, Cofactor expansion, Determinant, Recursive

### Abstract

This research examines the algorithm to determine the Determinant of n x n matrix using cofactor expansion and the implementation using recursive algorithm. Random function is added as an option to generate large matrix. To identified singular matrix and to avoid unnecessary further process, the algorithm searches for rows that are multiples of integer from another row, or columns that are multiples of integer from another column, then returns 0 as a Determinant value. In order to minimize the number of iterations and computations, the algorithm searches for rows or columns having the highest number of zero elements to be expanded. The program will not expand zero element and immediately returns a value of zero for those cofactor. Finally the program calculates the number of iterations performed each time the cofactor expands to calculate the Determinant of 2 x 2 matrix.In conclusion, the data shows that the use of recursice algorithm to iteratively expand cofactor considering the row and column having highest number of zero, will reduce the number of iteration and computation.