Q: Finding an inverse of a matrix in terms of a variable I'm studying some further maths units so that I can be ready for some units I have to take alongside my future PHD. I've been doing well but would love some confirmation with this question.
Let $X =\begin{bmatrix} 6 &  a \\ -2 & -5\end{bmatrix}$ where $a$ is a constant and is not equal to 15. 
I am trying to find $X^{-1}$ in terms of $a$. (So the inverse, in terms of $a$)
So I was thinking, by my current understanding, to swap the positions of $a$ and $d$ in this matrix so $6$ and $-5$ are in opposite positions. Then I need to put a negative sign in front of $b$ and $c$, so a becomes $-a$ and $-2$ becomes $+2$. 
Then I need to divide everything by the determinant which is $(ad-bc)$.
Am I along the correct lines here?
Then clearly I need to think about taking the a outside of the matrix so that my inverse can be in terms of a.
Thanks for any guidance in advance.

A: According to your sayings matrix $$X^{-1} =\dfrac{1}{2a-30}\cdot 
\begin{pmatrix} 
-5 & -a\\
2 & 6
\end{pmatrix} =  
\begin{pmatrix}
\dfrac{-5}{2a-30} & -\dfrac{a}{2a-30}\\
\dfrac{2}{2a-30} & \dfrac{6}{2a-30}
\end{pmatrix},$$ which is written in terms of $a$.
Now, for the part you asked me in the discussion, we want to define $a$ such that 
$$X + X^{-1} = \begin{pmatrix} 1 & 0 \\ 0 & 1\end{pmatrix}.$$
Thus,
$$\begin{pmatrix}
6+\dfrac{-5}{2a-30} & a-\dfrac{a}{2a-30}\\[2ex]
-2+\dfrac{2}{2a-30} & -5+\dfrac{6}{2a-30}
\end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1\end{pmatrix}.
$$
Can you take it from here?

A: So in order of position in the matix I have
\begin{gather}
a=\frac{1}{2a}-30\\
b=2a-30\\
c=2a-30\\
d=\frac{1}{2a}-30\\
\end{gather}
So I'm assuming I can add the halves to give values of $2a-30$.
Adding all of these together gives me $8a-120$
Therefore I can ascertain that 
\begin{gather}
8a-120=0\\
8a=120\\
a=15.
\end{gather}
