PostgreSQL is not designed primarily for heavy linear algebra. Pure PL/pgSQL implementations (like Gauss-Jordan) would be very slow and inefficient for 1000x1000. Extensions are the way to go, but availability and performance vary.
PgEigen is a PostgreSQL extension providing bindings to Eigen C++ linear algebra library.It supports matrix inversion and other matrix operations efficiently.
Pros: Fast, tested on large matrices, uses compiled C++ code.
Cons: Needs installation of C++ dependencies and admin rights.
OneSparse is specialised for sparse matrices and might not be ideal for dense 1000x1000.