(I'm assuming you're referring to FEM) The entries of a stiffness matrix are inner products (bilinear forms) of some basis functions. Insofar as you will typically be dealing with symmetric bilinear...
You can factorize the matrix using LU or LDLT factorization algorithm. inverse of a diagonal matrix (D) is really simple. To find the inverse of L, which is a lower triangular matrix, you can find...