I have been trying to create a library of custom functions that I could just call at the start of every notebook.
For instance, say I want the following functions to be part of the Library, or even be considered by Mathematica as part of the Built-in set of functions
Cofactor[mat_, i_, j_] /; (And @@ Thread[{i, j} <= Dimensions[mat]]) := (-1)^(i + j)*
Det[Drop[#, {j}] & /@ Drop[mat, {i}]];
inverseElement[mat_, i_, j_] /; (And @@ Thread[{i, j} <= Dimensions[mat]]) :=
Cofactor[mat, j, i]/Det[mat];
I haven't been able to find some clear instructions in the documentations on how to do this. I have tried to create an .m file, but then when I use Import to include it to the notebook, functions are not recognized.