Consider a matrix of the form #A=((a,b),(c,d))# and let its inverse be of the form #A^{-1}=((\alpha, \beta),(\gamma, \delta))#.
Our job is to solve for #\alpha, \beta, \gamma # and #\delta# in terms of #a, b, c# and #d#.
Use the fact that #A\timesA^{-1}=I# to get the four equations to solve the four unknowns.
#((a,b),(c,d)).((\alpha,\beta),(\gamma,\delta))=((1,0),(0,1))#
#((a\alpha+b\gamma, a\beta+b\delta),(c\alpha+d\gamma,c\beta+d\delta))=((1,0),(0,1))#
Comparing component wise, we get four equations required to solve the four unknowns
#a\alpha + b\gamma = 1# ....... (1)#\quad\qquad # #a\beta + b\delta = 0# ........ (2)
#c\alpha + d\gamma = 0# ....... (3) #\qquad# #c\beta + d\delta = 1# ......... (4)
Step 1: Use (3) to eliminate #\gamma# in (1) and solve for #\alpha#.
From (3), #\gamma = - c/d\alpha#, substitute this in (1)
#\alpha(a-b c/d)=1 \qquad \rightarrow \alpha = d/(ad-bc)#
#\gamma = -c/d\alpha = -c/(ad-bc)#
Step 2: Use (2) to eliminate #\delta# in (4) and solve for #\beta#.
From (2), #\delta = - a/b\beta#, substitute this in (4)
# \beta(c-d a/b)=1 \qquad \rightarrow \beta = -b/(ad-bc)#
#\delta = -a/b\beta = a/(ad-bc)#
Step 3: Recognise that #(ad-bc)# is the determinant value of the matrix #A#
#|A| = |(a,b),(c,d)|=ad-bc#
#\alpha = d/|A|; \qquad \beta = -b/|A|; \qquad \gamma = -c/|A|; \qquad \delta = a/|A|#.
Therefore, #A^{-1}=1/|A|((d,-b),(-c,a))#.
You can see that this works only as long as #|A|\ne0#
If #|A|=0# then the matrix is said to be singular and non-invertible.