# How to write simulataneous system of linear equations?

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:

• What have you tried so far? Please add a minimal working example (MWE) of your current code. Commented Apr 6, 2020 at 9:49
• Here there is a start point: tex.stackexchange.com/questions/254261/… Commented Apr 6, 2020 at 9:55
• The 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
Commented Apr 6, 2020 at 10:11
• OK, then I won't bother to provide an answer.
– Mico
Commented Apr 6, 2020 at 10:27
• @Mico I want both! Commented Apr 6, 2020 at 10:49

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}