# System of equations

I am a beginner in Latex and I would like to know how I can write this system of equations

But I don't know how.

I have tried this code:

\documentclass{article}
\usepackage{mathtools}
\usepackage{nccmath}
$$\centering \left\{\begin{split} \mfrac{k_{i\omega}}{k_{p\omega}} &=2\pi \times 10 \\ |\mfrac{(k_{p\omega}s + k_{i\omega})}{s}.\mfrac{1}{(T s + 1)}| &= 1 \\ \end{split}\right.$$
\end{document}


But I couldn't get the absolute value symbol as shown in the figure above and also I couldn't display the s=jw under the absolute value symbol and also the equations aren't aligned

A solution using the cases environment:

\documentclass[]{article}

\usepackage{amsmath}

\begin{document}
$$\begin{cases} k_{i\omega}/k_{p\omega}=2\pi\times 10\\ \left\lvert\frac{k_{p\omega}s+k_{i\omega}}{s}\cdot\frac{1}{Ts+1}\right\rvert_{S=\mathrm{j}\cdot2\pi}=1 \end{cases}\,.$$
\end{document}


• Personally, I do not prefer using cases if there are no cases semantically speaking (WYSIWYM). Commented Dec 12, 2019 at 23:01
• @ivankokan that's why I've added the cleaner array approach. Commented Dec 12, 2019 at 23:02

A solution using array (no packages needed):

\documentclass[]{article}

\begin{document}
$$\left\{\begin{array}{@{}l@{}} k_{i\omega}/k_{p\omega}=2\pi\times 10\\ \left| \frac{k_{p\omega}s+k_{i\omega}}{s}\cdot\frac{1}{Ts+1} \right|_{S=\mathrm{j}\cdot2\pi}=1 \end{array}\right.\,.$$
\end{document}


\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{equation*}
\left\{
\begin{aligned}
& k_{i\omega} / k_{p\omega} = 2\pi \times 10 \\
& {\left|
\frac{k_{p\omega}s + k_{i\omega}}{s} \cdot \frac{1}{Ts + 1}
\right|}_{s = j \cdot 2\pi} = 1
\end{aligned}
\right.
\end{equation*}
\end{document}


• In fact, I want the equations to aligned on the left not based on the equal operator? Commented Dec 12, 2019 at 22:56
• I want the first equation to be on the left too Commented Dec 12, 2019 at 22:59
• Edited. In general, use the & to specify the place of alignment. Commented Dec 12, 2019 at 23:13

Here is a way to do it, with the dcases and spreadlines environments, from mathtools. The latter package lets you define additional vertical spacing between rows of a multiline equation, which is necessary here, due to the fractions in each line.

I added another solution with the empheq package.

Unrelated: preferably load nccmath before mathtools, as there might be problems with the \intertext command. Also, I defined an \abs command for the absolute value with the \DeclarePairedDelimiter command from mathtools to have the vertical lines adjusted to their contents.

\documentclass{article}
\usepackage{nccmath}
\DeclarePairedDelimiter{\abs}\lvert\rvert

\begin{document}

$$\begin{dcases} \mfrac{k_{i\omega}}{k_{p\omega}} =2\pi \times 10 \\ \abs*{\mfrac{(k_{p\omega}s + k_{i\omega})}{s}\cdot \mfrac{1}{(T s + 1)}}= 1 \end{dcases}$$

\begin{empheq}[left=\empheqlbrace]{equation}
\begin{aligned}
& \mfrac{k_{i\omega}}{k_{p\omega}} =2\pi \times 10 \\
& \abs*{\mfrac{(k_{p\omega}s + k_{i\omega})}{s}\cdot \mfrac{1}{(T s + 1)}}= 1
\end{aligned}
\end{empheq}

\end{document}


• What is the purpose of \abs*{stuff} compared with \abs{stuff}? Commented Dec 13, 2019 at 4:51
• It adds a pair of implicit \left ... \right. Another solution would be, say, \abs[\bigg]{stuff}, which adds a pair of implicit \biggl ... \biggr. Commented Dec 13, 2019 at 8:12

For those like me that came here just to know how to represent a system with two lines of equations and don't care about the rest:

$A = \left\{ \begin{array}{l} a &\\ b \end{array} \right.$


(screenshot taken from Obsidian markdown editor)

### Simple explanation

• You put your equations inside \begin{array}{l} \end{array}, the l mean align left.
• You separate every element of the array with & and use \\ to change line and put them on different lines.
• \left\{ creates the curly brace on the left and \right. means there's no visible delimiter on the right.
• You can add as many lines as you want, likes this:
$A = \left\{ \begin{array}{l} a &\\ b &\\ c &\\ d \end{array} \right.$


• @JoséCarlosSantos I respectfully disagree. It adds a lot because it shows only the basic code that someone trying to represent a system needs with a basic explanation without any of the extra confusing code that will just scare anyone that is not a latex specialist and doesn't have the time to or patience to analyse the entire code of other answers. Any student that needs this information for a project and is already overwhelmed by the lack of time they have will be thankful to see it simplified. Commented May 26, 2023 at 17:32
• Completely agree, with the above, sometimes is just a simple equation or something fast without the need to use anything else Commented Dec 15, 2023 at 22:48

A solution with a customized environment in mathematical expression or equation in the preamble

\newenvironment{system}%
{\left\lbrace\begin{array}{@{}l@{}}}%
{\end{array}\right.}


And in the text for example

$$\begin{system} equation 1 \\ equation 2 \end{system}$$


This code works but was suggested to me by a friend during I was writing my master's thesis

• This is essentially Skillmon's answer, wrapped in a custom environment. Commented May 12, 2023 at 8:59
• In fact is more clean in the text if there are more systems of equations. Now is less obscure the compact definition in the preample. But thanks to this community for having improved my knowledge. I'm new and tell me if my answer is useless. My friend was and is still a guru for me in using LaTex... Commented May 13, 2023 at 14:50

I added my humble proposal using an array for my MWE. The output is very similar to the previous answers. The screenshot is:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
$\left\{ \begin{array}{ll} k_{i\omega}/k_{p\omega}=2\pi\times 10 &\\ \Bigl|\frac{k_{p\omega}s + k_{i\omega}}{s}\cdot\frac{1}{Ts+1} \Bigr|_{S=\mathrm{j}\cdot 2\pi}=1 \end{array} \right.$
\end{document}


For fun:

This uses the amsmath package due to the use of \substack. This avoids any align, aligned, gather, array, ... environments but I had to pay the price of aligning manually.

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
$$\Large\left\{\substack{\hspace{-2.1cm}\,k_{i\omega}/k_{p\omega}\,=\,2\pi\,\times\, 10\vspace{0.2cm}\\\,\left|\frac{k_{p\omega}s\,+\,k_{i\omega}}{s}\,\cdot\,\frac{1}{Ts\,+\,1}\right|_{s\,=\,{\rm j}\,\cdot\,2\pi}\,=\,1}\right.$$
\end{document}