The adjoint command computes the classical adjoint of a square matrix A, defined as the inverse of A multiplied by the determinant of A. If the matrix is singular then null is returned. An optional second argument P specifies the modulus.
A = [[1,2],[3,4]]; adjoint(A); [[4, -2], [-3, 1]] 1/A; [[-2, 1], [3/2, -1/2]] determinant(A); -2 adjoint(A,11); [[4, 9], [8, 1]]