[Tex/LaTex] latex \right] not show up in pdf

math-mode

The following is a piece of LaTeX code displaying a function. But in the PDF file generated , the right bracket "]", which is last thing in the equation, does not show up. However, if I replace "\right]" with just "]", then the right bracket show up. But I want the larger right bracket "\right]", not the small one "]".
This code has another problem: the two fractions have different sizes! The first fraction is taller and the second fraction is shorter. The second fraction turns out to have smaller font size on the PDF, which I do not like.

Could anyone please point out to me how I can insert a large right bracket and have all the fractions use the same font size as those non-fractions (i.e. fractions should be twice the height as those non-fraction numbers)?

$\textbf{E} = E_0 \left[\frac{1}{\sqrt{2}} \textbf{\hat{x}} cos(kz-\omega t) + \frac{i}{\sqrt{2}} \textbf{\hat{y}} cos\left(kz-\omega t+\frac{\pi}{2}\right)\right]$

enter image description here

Best Answer

You probably want

$\mathbf{E} = E_0 \bigl[\frac{1}{\sqrt{2}} \mathbf{\hat{x}} \cos(kz-\omega t)
  + \frac{i}{\sqrt{2}} \mathbf{\hat{y}} \cos(kz-\omega t+\frac{\pi}{2})\bigr]$

For getting a variable in boldface the correct way is to say \mathbf (which works also with accents such as \hat).

Instead of \bigl[ and \bigr] you can say \left[ and \right], it depends on personal taste: I feel that the latter gives too high brackets.

For the "cosine function" the right input is \cos.

Related Question