The dot product of two vectors $ a = (a_1, a_2) $ and $ b = (b_1, b_2) $ is defined as:
$$ a\cdot b = a_1\cdot b_1 + a_2\cdot b_2 $$In this case we have:
$$ \left(5,~-9\right) \cdot \left(-1,~-4\right) = 5\cdot\left(-1\right)+\left(-9\right)\cdot\left(-4\right) = -5 + 36 = 31 $$