7
$\begingroup$

$4T_1-T_2 - T_4 = 30$
$-T_1+4T_2 -T_3 = 60$
$-T_2 + 4T_3 + T_4 = 70$
$-T_1 + T_3 + 4T_4 = 40$

Is it possible to put the above system of equations parallel to right side of the below matrix?

$ \begin{bmatrix} 4 & -1 & 0 & -1 & 30 \\ -1 & 4 & -1 & 0 & 60 \\ 0 & -1 & 4 & 1 & 70 \\ -1 & 0 & 1 & 4 & 40 \\ \end{bmatrix} $

{Finished]

$\begin{array}{rcl} 4T_1-T_2 - T_4 &=& 30 \\ -T_1+4T_2 -T_3 &=& 60\\ -T_2 + 4T_3 - T_4 &=& 70\\ -T_1 - T_3 + 4T_4 &=& 40\\ \end{array} \qquad \begin{bmatrix} 4 & -1 & 0 & -1 & 30 \\ -1 & 4 & -1 & 0 & 60 \\ 0 & -1 & 4 & -1 & 70 \\ -1 & 0 & -1 & 4 & 40 \\ \end{bmatrix} \space \begin{array}{rcl} R_1 &↔& R_4 \\ R_2 &↔&R_3 \\ \\ \\ \end{array} $

$\endgroup$
  • $\begingroup$ you want to put them on the same "line"? $\endgroup$ – Surb Mar 23 '16 at 16:32
  • $\begingroup$ You can use \begin{array} for that, but it might be simpler to use \begin{cases} to build your system of equations and then put it in the same $$...$$ as your \begin{bmatrix}. $\endgroup$ – Surb Mar 23 '16 at 16:34
  • $\begingroup$ @Surb Sort of. The system takes 4 lines, so does the matrix. I want to align them side by side. $\endgroup$ – buzzee Mar 23 '16 at 16:50
10
$\begingroup$

First, note that your system of equation can be written in a "better" way:
Indeed,

\begin{array}{rcl} a+b & = & c \\ d+e & = & i\end{array}

will produce $$\begin{array}{rcl} a+b & = & c \\ d+e & = & i\end{array}$$ Now, with

\begin{array}{rcl} a+b & = & c \\ d+e& = & i\end{array} \qquad \begin{bmatrix} a & b \\ d & e \end{bmatrix}

(where the \qquad is just here for spacing) you will get $$\begin{array}{rcl} a+b &=& c \\ d+e&=& i\end{array} \qquad \qquad \begin{bmatrix} a & b \\ d & e \end{bmatrix}$$ Finally, note that to write your system, you can also use \begin{cases}...\end{cases}, that is, with

\begin{cases}a+b = c \\ d+e= i\end{cases}

you'll get $$\begin{cases}a+b = c \\ d+e= i\end{cases}$$

$\endgroup$
  • 3
    $\begingroup$ It would be also possible to put systems and matrices into another array. For example, like this: $$\begin{array}{cc} \begin{array}{rcl} x+y & = & 1 \\ x-y& = & 1\end{array} & \left(\begin{array}{cc|c} 1 & 1 & 1 \\ 1 &-1 & 1 \end{array}\right)\\\hline \begin{array}{rcl} x+y & = & 1 \\ 2x& = & 2\end{array} & \left(\begin{array}{cc|c} 1 & 1 & 1 \\ 2 & 0 & 2 \end{array}\right) \end{array}$$ It might be useful if you want to illustrate multiple steps in this way. $\endgroup$ – Martin Sleziak Mar 24 '16 at 7:49
  • 8
    $\begingroup$ it is probably better to use \begin{align}...\end{align} for a system than to use the array environment. The spacing around the equal sign will be better. Note that align only needs an ampersand before the equals, not one after. Finally, to do your mixed alignment and matrix, use \begin{aligned}...\end{aligned} instead. $\endgroup$ – Davide Cervone Mar 25 '16 at 12:17
6
$\begingroup$

The amsmath functionality is available in MathJaX, so you can do, e.g.,

$\newcommand{\9}{\phantom{9}}$ $$ \begin{alignedat}{3} 4T_1 &- \9 T_2 &&- \9 T_4 &&= 30, \\ -T_1 &+ 4 T_2 &&- \9 T_3 &&= 60, \\ -T_2 &+ 4 T_3 &&+ \9 T_4 &&= 70, \\ -T_1 &+ \9 T_3 &&+ 4 T_4 &&= 40; \end{alignedat}\qquad\qquad \left[\begin{array}{@{}rrrrr@{}} 4 & -1 & 0 & -1 & 30 \\ -1 & 4 & -1 & 0 & 60 \\ 0 & -1 & 4 & 1 & 70 \\ -1 & 0 & 1 & 4 & 40 \\ \end{array}\right]. $$

to obtain $\newcommand{\9}{\phantom{9}}$ $$ \begin{alignedat}{3} 4T_1 &- \9 T_2 &&- \9 T_4 &&= 30, \\ -T_1 &+ 4 T_2 &&- \9 T_3 &&= 60, \\ -T_2 &+ 4 T_3 &&+ \9 T_4 &&= 70, \\ -T_1 &+ \9 T_3 &&+ 4 T_4 &&= 40; \end{alignedat}\qquad\qquad \left[\begin{array}{@{}rrrrr@{}} 4 & -1 & 0 & -1 & 30 \\ -1 & 4 & -1 & 0 & 60 \\ 0 & -1 & 4 & 1 & 70 \\ -1 & 0 & 1 & 4 & 40 \\ \end{array}\right]. $$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .