I want to code this equation in LaTeX:

I'd like to know how to code the equation and the description below it with a reference as well.
|
|
Even though your question was thoroughly answered here's my solution, it differs only in not using a table but a list:
Which produces the following result:
|
|||||
|
|
Some more flair in managing the "where" clause, and formatting of the conditions:
|
|||||||||
|
|
You can add the line over the variables using
You can change the space between the columns in the tabular by adding |
|||||||||
|
|
If you want to create a numbered equation as in your example, put the math part in an equation environment and add a
Of course, you can tweak it to your liking, e.g. put the sum limits above/below the sum (append |
|||
|
|