# [Octave], 72 bytes <!-- language-all: lang-matlab --> function V=f(A)V=A'/trace(A*A');for i=1:1e4V*=2*eye(size(A))-A*V;end;end [Try it online!](https://tio.run/##y08uSSxL/f8/rTQvuSQzP08hzDZNw1EzzNZRXb@kKDE5VcNRy1Fd0zotv0gh09bQyjDVJEzL1kgrtTJVozizCiitqanrqBVmnZqXAsL/HW2LEvNSNIx1jDWtuVIyiws0MvPKQKogHHV1KANki@Z/AA "Octave – Try It Online") This is not particularly well golfed, but I wanted to advertise an approach that could be useful for other non-builtin answers. This uses the Hotelling-Bodewig scheme: $$ V_{i+1} = V_i\left(2I - AV_i\right)$$ Which iteratively computes the inverse of a non singular matrix. This is guaranteed to converge for \$\left\lVert I - AV_0\right\rVert < 1\$ (under a suitable matrix norm). Choosing the \$V_0\$ is difficult, but Soleymani, A. shows in ["A New Method For Solving Ill-Conditioned Linear Systems"](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.882.7271&rep=rep1&type=pdf) that the inital guess \$V_0 = \frac{A^T}{\text{tr}(AA^T)}\$ will always satisfy this condition, so the system is numerically stable. What makes this a particularly attractive approach to other potential answers is that we don't require any builtin determinant or inverse functions. The most complex part is just matrix multiplication, since the transpose and trace are trivial to compute. I have chosen `1e4` iterations here to make the runtime somewhat reasonable, although you could of course push it to `1e9` with no loss of byte count. [Octave]: https://www.gnu.org/software/octave/