2

I am working in TeXworks and I would like to use [ ] , but when i use \right] , it does not work. What should I do in this regards?when I use just ], there is no space between 2 and ], how should I do it?

for example I have $x = [2, 2]$.

4
  • This is the right way to type, as you are doing: $x=[2,2]$. If you use \right you must use also \left before.
    – Sigur
    Jul 18 '14 at 1:11
  • If it is one side , for exapmle $[2, \infty)$ what should I do?
    – rose
    Jul 18 '14 at 1:13
  • Do exactly as you wrote. TeX will insert blank spaces if necessary.
    – Sigur
    Jul 18 '14 at 1:28
  • I do not see any reason for using \right in the expression $x=[2,2]$. Jul 18 '14 at 5:38
3

There is no need to use \right], as the following example shows:

\documentclass{article}
\begin{document}
$x=[2,2]$ $x=\left[2,2\right]$

$x=[2,\infty)$
\end{document}

enter image description here

For denoting a half open interval, the notation with the parenthesis is the most common. If you instead prefer the reverse bracket, which you shouldn't do, use \mathopen and \mathclose:

$\mathopen]a,b]$
$[a,b\mathclose[$
$\mathopen]a,b\mathclose[$

You may have found that \right is to be used in the second case, but you have to remember that \right needs a matching \left before it.

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.