For a matrix #A# to be invertible, the determinant #detA!=0#
Let's calculate
#detA=|(1,2,1),(2,5,4),(1,4,9)|#
#=1*|(5,4),(4,9)|-2*|(2,4),(1,9)|+1*|(2,5),(1,4)|#
#=1*(45-16)-2*(18-4)+1*(8-5)#
#=29-28+3#
#=4#
As #detA!=0#, matrix #A# is invertible
We calculate the matrix of cofactors
#C=((|(5,4),(4,9)|,-|(2,4),(1,9)|,|(2,5),(1,4)|),(-|(2,1),(4,9)|,|(1,1),(1,9)|,-|(1,2),(1,4)|),(|(2,1),(5,4)|,-|(1,1),(2,4)|,|(1,2),(2,5)|))#
#=((29,-14,3),(-14,8,-2),(3,-2,1))#
The transpose of #C# is
#C^T=((29,-14,3),(-14,8,-2),(3,-7,1))#
The inverse is
#A^-1=1/detA*C^T#
#=1/4((29,-14,3),(-14,8,-2),(3,-2,1))#
#=((29/4,-14/4,3/4),(-14/4,8/4,-2/4),(3/4,-2/4,1/4))#
Verification
#A*A^-1=((1,2,1),(2,5,4),(1,4,9))*((29/4,-14/4,3/4),(-14/4,8/4,-2/4),(3/4,-2/4,1/4))#
#=((1,0,0),(0,1,0),(0,0,1))#
#=I#