The agent maximizes his/her utility under the budget constraint, by choosing the allocation of goods.
q最好写作x,以便作为一个配置。
max u(q)
subject to p*q=M
where p,M are exogenous.
this linear math problem can be solved , the solution q* is the best allocation.
you'd better use the Lagrange Multiplier to understand the economic implication.
Lagrangian=u(q)+lamda*(M-p*q)
Derive it with repect to q, and you can obtain the first order condition, it means if the agents do the max problem correctly , the optimal allocation must satisfy the FOC.