# Solve this

Question:

If $A=\operatorname{diag}[2,-5,9], B=\operatorname{diag}[-3,7,14]$ and $C=\operatorname{diag}[4,-6,3]$, find:

(i) $A+2 B$

(ii) $B+C-A$

Solution:

If Z = diag[a,b,c], then we can write it as

$Z=\left[\begin{array}{lll}a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c\end{array}\right]$

So, $A+2 B=\left[\begin{array}{ccc}2 & 0 & 0 \\ 0 & -5 & 0 \\ 0 & 0 & 9\end{array}\right]+2\left(\left[\begin{array}{ccc}-3 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 14\end{array}\right]\right)$

$=\left[\begin{array}{ccc}2 & 0 & 0 \\ 0 & -5 & 0 \\ 0 & 0 & 9\end{array}\right]+\left[\begin{array}{ccc}-6 & 0 & 0 \\ 0 & 14 & 0 \\ 0 & 0 & 28\end{array}\right]$

$=\left[\begin{array}{ccc}4 & 0 & 0 \\ 0 & 9 & 0 \\ 0 & 0 & 37\end{array}\right]$

=diag[4,9,37]

Conclusion: A + 2B = diag[4,9,37]

(Given answer is wrong)

ii. B + C – A

If Z = diag[a,b,c], then we can write it as

$Z=\left[\begin{array}{lll}a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c\end{array}\right]$

$\mathrm{B}+\mathrm{C}-\mathrm{A}=\left[\begin{array}{ccc}-3 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 14\end{array}\right]+\left[\begin{array}{ccc}4 & 0 & 0 \\ 0 & -6 & 0 \\ 0 & 0 & 3\end{array}\right]-\left[\begin{array}{ccc}2 & 0 & 0 \\ 0 & -5 & 0 \\ 0 & 0 & 9\end{array}\right]$

$=\left[\begin{array}{ccc}-1 & 0 & 0 \\ 0 & 6 & 0 \\ 0 & 0 & 8\end{array}\right]$

$=\operatorname{diag}[-1,6,8]$

Conclusion: $\mathrm{B}+\mathrm{C}-\mathrm{A}=\operatorname{diag}[-1,6,8]$

iii. $2 \mathrm{~A}+\mathrm{B}-5 \mathrm{C}$

If $Z=\operatorname{diag}[a, b, c]$, then we can write it as

$Z=\left[\begin{array}{lll}a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c\end{array}\right]$

$2 \mathrm{~A}+\mathrm{B}-5 \mathrm{C}=2\left(\left[\begin{array}{ccc}2 & 0 & 0 \\ 0 & -5 & 0 \\ 0 & 0 & 9\end{array}\right]\right)+\left[\begin{array}{ccc}-3 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 14\end{array}\right]-5\left(\left[\begin{array}{ccc}4 & 0 & 0 \\ 0 & -6 & 0 \\ 0 & 0 & 3\end{array}\right]\right)$

$=\left[\begin{array}{ccc}4 & 0 & 0 \\ 0 & -10 & 0 \\ 0 & 0 & 18\end{array}\right]+\left[\begin{array}{ccc}-3 & 0 & 0 \\ 0 & 7 & 0 \\ 0 & 0 & 14\end{array}\right]-\left[\begin{array}{ccc}20 & 0 & 0 \\ 0 & -30 & 0 \\ 0 & 0 & 15\end{array}\right]$

$=\left[\begin{array}{ccc}-19 & 0 & 0 \\ 0 & 27 & 0 \\ 0 & 0 & 17\end{array}\right]$

$=\operatorname{diag}[-19,27,17]$

Conclusion: $2 \mathrm{~A}+\mathrm{B}-5 \mathrm{C}=\operatorname{diag}[-19,27,17]$

(Given answer is wrong)