Let $ G = \{ \bar{S}_1 ,\bar{S}_2 ; u_1 , u_2 \} $ be a normal-form two player game. A mixed strategy $ \bar{\bf{p}}_i = (p(s_i))_{s_i \in \bar{S}_i} $ for player $ i $ is a probability distribution where, $ (p(s_i)) \geq 0 $ and $ \Sigma_{s_i \in \bar{S}_i} p(s_i) = 1 $.
$\\$
The expected payoff for player $ 1 $ according to the mixed strategy $ \bar{\bf{p}}_1 $ is denoted: $$ u_1(p_1,p_2) = \Sigma_{s_1 \in \bar{S}_1} [p_1(s_1) p_2(s_2)] u_i(s_1,s_2) = \sum_{n = 1}^N \sum_{m=1}^M p_{1n} p_{2m} u_1(s_1,s_2) = \langle p_1 , A_1 p_2\rangle $$ where $A_1$ is the payoff matrix for player $1$.
$\\$
So player $1$ wishes to maximise $u_1(p_1,\bar{p}_2)$ w.r.t. $p_1$. That is; $$ \exists \ \bar{p}_1 : \frac{d}{dp_1} \langle p_1 , A_1 \bar{p}_2\rangle |_{p_1 = \bar{p}_1} = 0 $$
Hence, $$ \exists \ \bar{p}_1 : u_1(\bar{p}_1,\bar{p}_2) \geq u_1(p_1,\bar{p}_2) $$ ie. a Mixed Nash Equilibria.
$\\$
For a Pure Nash Equilibria, set $ p(s_j) = 1$ and $ p(s_i)_{i \ne j} = 0 $ such that the payoff is maximised in this fashion.