Can someone please show me how to work through this type of sum?

Find the value(s) of $\displaystyle a$ such that the line with equation$\displaystyle y=x$is tangent to the parabola with equation$\displaystyle y=x^2+ax+1$

I know the determinant should equal zero to create a tangent with the parabola, but I don't know how to solve it.

Any help will be much appreciated,

Thanks,

22upon7