Matrix Systems
Problem statement: Solve the listed algebra and matrix problems as given by the user.
1. a) Problem 1(a): If the demand and supply laws are $2p^2+q^2=3$ and $p+q=2$ find the equilibrium price and quantity.
1.a) Solution:
1. Start with the two equations $2p^2+q^2=3$ and $p+q=2$.
2. From $p+q=2$ we get $q=2-p$.
3. Substitute $q=2-p$ into $2p^2+q^2=3$ to obtain $2p^2+(2-p)^2=3$.
4. Expand and simplify the left side to get $2p^2+4-4p+p^2=3$.
5. Combine like terms to obtain $3p^2-4p+1=0$.
6. Compute the discriminant $\Delta = (-4)^2-4\cdot3\cdot1=16-12=4$.
7. Solve the quadratic to get $p=\dfrac{4\pm2}{6}$, so $p=1$ or $p=\dfrac{1}{3}$.
8. Compute $q=2-p$, giving $q=1$ when $p=1$ and $q=\dfrac{5}{3}$ when $p=\dfrac{1}{3}$.
9. Therefore the equilibrium solutions are $ (p,q)=(1,1)$ and $ (p,q)=\left(\dfrac{1}{3},\dfrac{5}{3}\right)$.
1. b) Problem 1(b): Verify for $A=\begin{pmatrix}1&0&1\\1&1&0\\0&1&1\end{pmatrix}$ and $B=\begin{pmatrix}0&1&1\\1&1&1\\1&1&1\end{pmatrix}$ that $A^3-A^2+A-2B=0$.
1.b) Solution and verification:
1. Compute $A^2$ by matrix multiplication to obtain $A^2=\begin{pmatrix}1&1&2\\2&1&1\\1&2&1\end{pmatrix}$.
2. Compute $A^3=A^2A$ to obtain $A^3=\begin{pmatrix}2&3&3\\3&2&3\\3&3&2\end{pmatrix}$.
3. Form $A^3-A^2+A$ which equals $\begin{pmatrix}2&3&3\\3&2&3\\3&3&2\end{pmatrix}-\begin{pmatrix}1&1&2\\2&1&1\\1&2&1\end{pmatrix}+\begin{pmatrix}1&0&1\\1&1&0\\0&1&1\end{pmatrix}$.
4. Simplify entrywise to get $A^3-A^2+A=\begin{pmatrix}2&2&2\\2&2&2\\2&2&2\end{pmatrix}$.
5. Compute $2B=2\begin{pmatrix}0&1&1\\1&1&1\\1&1&1\end{pmatrix}=\begin{pmatrix}0&2&2\\2&2&2\\2&2&2\end{pmatrix}$.
6. Subtract to get $A^3-A^2+A-2B=\begin{pmatrix}2&2&2\\2&2&2\\2&2&2\end{pmatrix}-\begin{pmatrix}0&2&2\\2&2&2\\2&2&2\end{pmatrix}=\begin{pmatrix}2&0&0\\0&0&0\\0&0&0\end{pmatrix}$.
7. The result is not the zero matrix; it equals $\begin{pmatrix}2&0&0\\0&0&0\\0&0&0\end{pmatrix}$, so with the given $B$ the identity $A^3-A^2+A-2B=0$ does not hold.
8. Note: if the $(1,1)$ entry of $B$ were 1 instead of 0 then $2B$ would be $\begin{pmatrix}2&2&2\\2&2&2\\2&2&2\end{pmatrix}$ and the identity would hold.
2. a) Problem 2(a): A firm invested 25 million and gets 7 lac per year, and 45 million yields 4 million per year. Find the linear relationship between investment and annual income and predict for 35 million.
2.a) Solution:
1. Convert units consistently; 7 lac = 0.7 million, so the two data points (investment I in million, return R in million) are $(25,0.7)$ and $(45,4)$.
2. Compute the slope $m=\dfrac{4-0.7}{45-25}=\dfrac{3.3}{20}=0.165$.
3. Use point-slope to get $R=0.165I+b$ and compute $b=0.7-0.165\cdot25=0.7-4.125=-3.425$.
4. The linear relationship (in million units) is $R(I)=0.165I-3.425$.
5. For $I=35$ million compute $R(35)=0.165\cdot35-3.425=2.35$ million which equals Tk. 2.35 million or 23.5 lac.
2. b) Problem 2(b): Solve by Cramer\'s rule the system $2x+y+z=0$, $x+y-3z=0$, $3x+2y-3z=0$.
2.b) Solution:
1. coefficient matrix $A=\begin{pmatrix}2&1&1\\1&1&-3\\3&2&-3\end{pmatrix}$ and RHS vector $\begin{pmatrix}0\\0\\0\end{pmatrix}$.
2. Compute $\det(A)$ by expansion to get $\det(A)=-1$.
3. Replace columns with RHS to compute determinants $D_x,D_y,D_z$ and note each replaced matrix has a zero column, so $D_x=D_y=D_z=0$.
4. By Cramer\'s rule $x=D_x/\det(A)=0$, $y=D_y/\det(A)=0$, $z=D_z/\det(A)=0$.
5. The unique solution is $x=0$, $y=0$, $z=0$.
3. a) Problem 3(a): Total salaries of A and B are equal; A gets 65% allowance of his basic salary and B gets 80% allowance; if basic of B is 1100 find basic of A.
3.a) Solution:
1. Let A\'s basic be $a$ and B\'s basic is given as 1100.
2. A\'s total salary is $a+0.65a=1.65a$.
3. B\'s total salary is $1100+0.80\cdot1100=1100+880=1980$.
4. Set $1.65a=1980$ and solve to get $a=\dfrac{1980}{1.65}=1200$.
5. Therefore A\'s basic salary is Tk. 1200.
3. b) Problem 3(b): Salary was Tk. 1200 in 2003 and Tk. 1350 in 2005. Express salary as a linear function of time and estimate salary in 2007.
3.b) Solution:
1. Let $x$ be years since 2003, so $x=0$ corresponds to 2003 and $x=2$ corresponds to 2005.
2. Two points are $(0,1200)$ and $(2,1350)$ so slope is $m=\dfrac{1350-1200}{2}=75$ per year.
3. The linear model is $S(x)=1200+75x$ where $x$ is years after 2003.
4. For 2007 we have $x=4$ and $S(4)=1200+75\cdot4=1500$.
5. Thus the estimated salary in 2007 is Tk. 1500.
4. a) Problem 4(a): A trust has Tk. 50,000 to invest in two bonds paying 5% and 6% to obtain annual interest of Tk. 2,780; use matrix algebra to find amounts invested in each bond.
4.a) Solution:
1. Let $x$ be amount in the 5% bond and $y$ be amount in the 6% bond, amounts in Tk.
2. Total investment gives $x+y=50000$.
3. Annual interest gives $0.05x+0.06y=2780$.
4. Write as linear system $\begin{pmatrix}1&1\\0.05&0.06\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}50000\\2780\end{pmatrix}$.
5. Solve by matrix methods or substitution: from $x=50000-y$ substitute to get $0.05(50000-y)+0.06y=2780$.
6. Simplify to $2500-0.05y+0.06y=2780$ so $2500+0.01y=2780$.
7. Solve $0.01y=280$ to get $y=28000$.
8. Then $x=50000-28000=22000$.
9. Therefore invest Tk. 22000 at 5% and Tk. 28000 at 6%.
4. b) Problem 4(b): Solve by Cramer\'s rule $x-2y+3z=11$, $2x+y+2z=10$, $3x+2y+z=9$.
4.b) Solution:
1. Coefficient matrix $A=\begin{pmatrix}1&-2&3\\2&1&2\\3&2&1\end{pmatrix}$ and RHS $\begin{pmatrix}11\\10\\9\end{pmatrix}$.
2. Compute $\det(A)$; expanding gives $\det(A)= -22$.
3. Compute $D_x$ by replacing first column with RHS: $D_x= -66$.
4. Compute $D_y$ by replacing second column with RHS: $D_y= -88$.
5. Compute $D_z$ by replacing third column with RHS: $D_z= -44$.
6. By Cramer\'s rule $x=\dfrac{D_x}{\det(A)}=\dfrac{-66}{-22}=3$, $y=\dfrac{D_y}{\det(A)}=\dfrac{-88}{-22}=4$, $z=\dfrac{D_z}{\det(A)}=\dfrac{-44}{-22}=2$.
7. The solution is $x=3$, $y=4$, $z=2$.
Graph/shape note: Two 3x3 matrices $A$ and $B$ are given and the identity to check is $A^3-A^2+A-2B=0$ with a discrepancy found at the $(1,1)$ entry for the provided $B$.