Softmax Regression

http://d2l.ai/chapter_linear-networks/softmax-regression.html

In the topic Log-Likelihood and others, what does ā€˜nā€™ represent?

n presents number of observation

Can somebody explain how -logp(y/x) = -sigma(y * log(y))