Is Goldstein's matrix formalism to Hamiltonian mechanics necessary? I am trying to see whether the matrix formalism of the Hamiltonian formalism (used in Goldstein's textbook) is truly necessary to solve problem in this framework.
It appears so based on the problem I've run into. From problem 8.15 in Goldstein we have

A dynamical system has the Lagrangian $$ L= \dot{q}_1{}^2 + \frac{\dot{q}_2{}^2}{a+bq_1{}^2} + k_1q_1{}^2 +k_2\dot{q}_1\dot{q}_2$$ where a,b,$k_1$, and $k_2$ are constants. Find the equations of motion in the Hamiltonian formalism.

Using $H=p^i\dot{q}_i-L$ (where $i=\{1,2\}$ and are summed over) I find that the Hamiltonian is
$$ H= \dot{q}_1{}^2 + \frac{\dot{q}_2{}^2}{a+bq_1{}^2} +k_2\dot{q}_1\dot{q}_2 -k_1q_1{}^2 $$
My concern comes in with the equations of motion.
In particular, consider how one would solve $\frac{\partial H}{\partial p_i} = \dot{q}_i$.
Using $p_i = \frac{\partial L}{\partial \dot{q}_i}$ I find
$$ p_1 = 2\dot{q}_1 + k_2 \dot{q}_2, \text{  and}$$
Unless there is some advanced chain rule having to do with taking partials of functions of several variables with respect to other fucntions of several variables, I think I really ought to look into this matrix formalism that Goldstein uses.
However, I'm not so sure about this matrix formalism. I'm quite confident that my Hamiltonian above is correct. How could it not be? Quite basic, no? However, this solution online uses the matrix formalism from Goldstein and they obtain a different Hamiltonian.
Can I have some insights on if my methods are not well-suited?
 A: The Hamiltonian is a function of the $p$'s and $q$'s, not the $\dot q$'s and $q$'s. Your expression is right, with the understanding that $\dot q_i = \dot q_i(p_1,p_2,q_1,q_2)$.
You need to invert the expressions $p_i = \frac{\partial L}{\partial \dot q_i}$ to obtain the $\dot q$'s as functions of the $p$'s and $q$'s and substitute the results into your expression for $H$.  This is somewhat messy and aggravating, but it's what you have to do to obtain the explicit form of the Hamiltonian.  From there, you can apply the Hamilton equations to get the equations of motion for the system.
As a side note, you never need to write systems of equations in matrix form; it's just that it is often extremely useful and convenient to do so.  Whether you solve for the $\dot q$'s in terms of the $p$'s via substitution or matrix inversion is up to you, but given that this would correspond to a 2x2 matrix, you should be able to instantly write down the inverse transformation.  In my opinion, that is the easier route, but you're free to do as you like.
