Prove two equations are equivalent
In your first equation w is weight matrix $(w_1 + w_2 + \ldots + w_j)$ and a is the input vector $(x_1 + x_2 + \ldots + x_j)$. Writing wa in component form means taking the dot product of these two vectors, which is $\sum_{j}w_ja_j$. Now, you just apply the sigmoid function to get your final answer:$$\sigma (z) = \frac{1}{1 + \exp(-z)}$$ $$\Rightarrow\sigma (\textbf{wa} + b) = \frac{1}{1 + \exp(-\sum_{j}w_jx_j - b)}$$