Solution:
Step 1 — form the equations. Each evening gives "number sold times price, summed over the three classes = takings":
30x+20y+10z=4600
20x+30y+20z=4600
10x+20y+30z=3400
Dividing each by 10 keeps the numbers small:
3x+2y+z=460,2x+3y+2z=460,x+2y+3z=340.
Step 2 — write it as AX=B.
A=321232123,X=xyz,B=460460340
Step 3 — check ∣A∣. Expanding along the first row,
∣A∣=3(9−4)−2(6−2)+1(4−3)=15−8+1=8=0,
so the prices are uniquely determined.
Step 4 — the adjoint. The cofactors give
adjA=5−41−48−41−45
(symmetric, as it must be, because A is symmetric).
Step 5 — solve.
X=815−41−48−41−45460460340=812300−1840+340−1840+3680−1360460−1840+1700=81800480320
X=1006040
So Class A costs ₹100, Class B ₹60 and Class C ₹40.
Check the first evening. 30(100)+20(60)+10(40)=3000+1200+400=4600. ✓