I have simultaneous system of linear equations. I want to eliminate the one variable to get the other. I don't know how to write them in LaTeX in form shown in picture below I have taken:
Asked
Active
Viewed 220 times
2
-
3What have you tried so far? Please add a minimal working example (MWE) of your current code. – epR8GaYuh Apr 06 '20 at 09:49
-
@epR8GaYuh I do not know how to write then how could I try, I know how to wirte equaton but don't know how to draw a line below them and changing the sign and then add. – Noor Aslam Apr 06 '20 at 09:52
-
1Here there is a start point: https://tex.stackexchange.com/questions/254261/how-can-you-draw-a-horizontal-line-inside-an-align-environment – Sebastiano Apr 06 '20 at 09:55
-
@Sebastiano In site you have mentioned brother, he is adding, in case of subtraction how to change the signs below ? – Noor Aslam Apr 06 '20 at 10:08
-
1The layout in the screenshot you provided is not that great. Do you need to reproduce this substandard layout, or might you be open to a better solution? – Mico Apr 06 '20 at 10:11
-
@Mico I want this substandard layout brother to reproduce! – Noor Aslam Apr 06 '20 at 10:13
-
1OK, then I won't bother to provide an answer. – Mico Apr 06 '20 at 10:27
-
1@Mico I want both! – Noor Aslam Apr 06 '20 at 10:49
-
1@Mico Please brother provide if possible! – Noor Aslam Apr 06 '20 at 11:16
1 Answers
5
Here's how I would typeset the equations at hand -- not exactly identical to the screenshot you posted. I make no excuse for the resulting discrepancy.
\documentclass{article}
\usepackage{newtxtext,newtxmath} % optional
\usepackage{booktabs} % for '\midrule' macro
\usepackage{array} % for '\newcolumntype' macroi
\newcolumntype{C}{>{{}}c<{{}}} % col. type for binary and relational symbols
\newcommand\mr[1]{\multicolumn{3}{r}{#1}} % handy shortcut macro
\begin{document}
Subtracting equation (3) from equation (4), we have
\[
\setlength\arraycolsep{0pt}
\begin{array}{lrCrCrCl}
& 5(2-i)z &+& 10iw &=& -5 &+& 5i\\
(-)\mkern18mu & 5(2-i)z &-& (7-i)w &=& 13 &-& 9i\rlap{\,.}\\
\midrule
& \mr{10iw+(7-i)w} &=& -18 &+& 14i\\
\Rightarrow & \mr{(7+9i)w} &=& -18 &+& 14i
\end{array}
\]
\end{document}
Mico
- 506,678

