2
$\begingroup$

I am confused by this question I am studying for MATLAB practice.

enter image description here

$\endgroup$
  • $\begingroup$ What exactly is confusing you? $\endgroup$ – copper.hat Mar 1 '14 at 23:12
  • $\begingroup$ Can matlab find the individual elementary matricies to solve or do I have to do it by hand? $\endgroup$ – KnowledgeGeek Mar 1 '14 at 23:23
  • $\begingroup$ I did it by hand, but it didn't seem like a very quick way of doing it $\endgroup$ – KnowledgeGeek Mar 1 '14 at 23:41
  • $\begingroup$ I presume you are meant to do it by hand for learning purposes? $\endgroup$ – copper.hat Mar 1 '14 at 23:56
  • $\begingroup$ This is a matlab assignment, I am assuming we use matlab. We haven't done this stuff by hand for months. $\endgroup$ – KnowledgeGeek Mar 2 '14 at 0:02
1
$\begingroup$

I thought this an interesting excercise so, I fired up Octave (poor man's Matlab) and gave it a try. Like I said in my comment, I tried to use Matlab to calculate the elementary matrices using the fact that $E = E_3E_2E_1 = L^{-1}$ but was uncessful. So then I thought that I'd just do row operations and construct the $E_i$ directly. Here is a transcript...

octave:1> A= [1, -2, 3; 2, -6, 5; -1, -4, 0]

A =

$ \begin{matrix} 1 & -2 & 3 \\ 2 & -6 & 5 \\ -1 & -4 & 0 \\ \end{matrix}$

octave:2> E1 = [1, 0, 0; -2, 1, 0; 1, 0, 1]

E1 =

$\begin{matrix} 1 & 0 & 0 \\ -2 & 1 & 0\\ 1 & 0 & 1\\ \end{matrix}$

octave:3> E1*A

ans =

$\begin{matrix} 1 & -2 & 3\\ 0 & -2 & -1\\ 0 & -6 & 3\\ \end{matrix}$

octave:4> E2 = [1, 0, 0; 0, 1, 0; 0, -3, 1]

E2 =

$\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & -3 & 1 \\ \end{matrix}$

octave:5> E2* (E1*A)

ans =

$\begin{matrix} 1 & -2 & 3 \\ 0 & -2 & -1 \\ 0 & 0 & 6 \end{matrix}$

octave:6>

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.