# Can this diagonal system be solved by modifying it to the $Ax=B$ form?

I'd like to use the $$Ax=B$$ form for solving the following system. $$\left[ \begin{matrix} t_0*d_0 & -t_1*e_0 & 0 & 0 & 0 \\ 0 & t_1*d_1 & -t_2*e_1 & 0 & 0 \\ 0 & 0 & t_2*d_2 & -t_3*e_2 & 0 \\ 0 & 0 & 0 & t_3*d_3 & -t_4*e_3 \\ \end{matrix} \right] = \left[ \begin{matrix} 0 \\ 0 \\ 0 \\ 0 \\ \end{matrix} \right]$$ Where: $$t_n$$ are variables. And $$d_{n}$$ and $$e_{n}$$ are constants.

Clearly this solves if all elements of $$\vec t = 0$$ but I'm looking for another solution, where one element of $$\vec t$$ is constrained to a constant, say $$t_1 = 20$$. Can this be done? Is $$Ax=B$$ even appropriate here?

Note: I'm revisiting a problem that could benefit from linear algebra after taking a very long hiatus. Apologies for missing obvious things.

• Did you really mean $\left( \begin{array}{ccccc} d_0 & -e_0 & 0 &0 & 0 \\ 0 & d_1 & -e_1 & 0 & 0 \\ 0 &0 & d_2 & -e_2 & 0 \\ 0 & 0 & 0 & d_3 & -e_3 \end{array} \right) \left( \begin{array}{c} t_1 \\ t_2 \\ t_3 \\ t_4 \end{array} \right) = \left(\begin{array}{c} 0 \\ 0 \\ 0 \\ 0 \end{array} \right)$ ? The way you wrote it doesn't make sense, because the left side of the equation is a matrix, and the right side is a vector. – Nick May 13 '19 at 23:17
• Quite possibly! My original system of equations is $\begin{matrix} t_0*d_0 - t_1*e_0 = 0 \\ t_1*d_1 - t_2*e_1 = 0 \\ t_2*d_2 - t_3*e_2 = 0 \\ t_3*d_3 - t_4*e_3 = 0 \\ \end{matrix}$ Isn't what you wrote equivalent to this? And isn't the matrix in the post the same thing as well, but aligned so that all t_n reside in their respective columns? – Gabe Krause May 13 '19 at 23:40
• Assuming the form I'm after is this, $$\left[ \begin{matrix} d_0 & -e_0 & 0 & 0 & 0 \\ 0 & d_1 & -e_1 & 0 & 0 \\ 0 & 0 & d_2 & -e_2 & 0 \\ 0 & 0 & 0 & d_3 & -e_3 \\ \end{matrix} \right] \left[ \begin{matrix} t_0 \\ 20 \\ t_2 \\ t_3 \\ t_4 \\ \end{matrix} \right] = \left[ \begin{matrix} 0 \\ 0 \\ 0 \\ 0 \\ \end{matrix} \right]$$ How do I deal with that constant $t_1 = 20$ when solving $\vec t = A^{-1} * B$ in something like Octave or Matlab? – Gabe Krause May 13 '19 at 23:58
• And here's one of the obvious things I could be presenting incorrectly. Are the following two representations drastically different in meaning? $$\left[ \mathbf A \right] \left[ \mathbf t \right] = \left[ \mathbf B \right]$$ and $$\left( \mathbf A \right) \left( \mathbf t \right) = \left( \mathbf B \right)$$ – Gabe Krause May 14 '19 at 0:19
• No. They are exactly the same. It is simply a matter of personal taste whether people like to use square brackets or round brackets for matrices and vectors. – Nick May 14 '19 at 0:20

Just do simple "back-substitution". The last equation is equivalent to $$t_3 = \frac{e_3}{d_3} t_4$$. Then the third equation gives $$t_2 = \frac{e_2}{d_2} t_3 = \frac{e_2 e_3}{d_2 d_3} t_4$$. Keep repeating to write all the variables $$t_1,t_2,t_3$$ as multiples of $$t_4$$.
• I like that! And appreciate your attention on this, Nick. I would definitely back-substitute by hand on a system this small. I probably should have mentioned that this was a tiny representation of a larger system, like $$t_n, \; where \; n \gt 1000$$ I am hoping to understand this in a way that would allow me to programmatically plug a large set of $d_n$ and $e_n$ values in to something like GNU Octave. But first-things-first. I hope to understand if this can fit into the $Ax=B$ format so that I can use Octave's standard x = linsolve (A, b) function. – Gabe Krause May 14 '19 at 0:53