Tables in LaTeX

I am not clear exactly you mean by build a table.
I use the software MathType to build matrices.
Here is a example:
\(\left( {\begin{array}{*{20}{c}} H&H \\ H&T \\ T&H \\ T&T \end{array}} \right)\)
You can see the code by clicking the reply icon.
 
Thanks pka. But by table I did not mean merely a matrix. I meant a matrix with column and row titles in addition to data. The data in the cells may be text, or numbers, or expressions.
 
I am not clear exactly you mean by build a table.
I use the software MathType to build matrices.
Here is a example:
\(\left( {\begin{array}{*{20}{c}} H&H \\ H&T \\ T&H \\ T&T \end{array}} \right)\)
You can see the code by clicking the reply icon.
The 20c is a width specification?

Specifically, I have five functions that are being multiplied and added together, and I want to build a table that shows succinctly the conditions where each is positive, zero, or negative.
 
Something like this?

[MATH]\newcommand\T{\Rule{0pt}{1em}{.3em}} \begin{array}{|c|c|} \hline X & P(X = i) \T \\\hline 1 \T & 1/6 \\\hline 2 \T & 1/6 \\\hline 3 \T & 1/6 \\\hline 4 \T & 1/6 \\\hline 5 \T & 1/6 \\\hline 6 \T & 1/6 \\\hline \end{array}[/MATH]
 
Something like this?

[MATH]\newcommand\T{\Rule{0pt}{1em}{.3em}} \begin{array}{|c|c|} \hline X & P(X = i) \T \\\hline 1 \T & 1/6 \\\hline 2 \T & 1/6 \\\hline 3 \T & 1/6 \\\hline 4 \T & 1/6 \\\hline 5 \T & 1/6 \\\hline 6 \T & 1/6 \\\hline \end{array}[/MATH]
Tanks Mark.

Yes. Except the northwest cell would be empty.

Running down the left edge, it would say p(x), g(x), h(x), h'(x), and q(x)

Running across the top row, it would say [MATH]\text {sgn}\{y(x)\} = - 1, \text {sgn}\{y(x)\} = 0[/MATH], and [MATH]\text {sgn}\{y(x)\} = 1[/MATH].

And then in the individual cells for say the q(x) row, the entries would be

[MATH]- 1 \iff - \sigma < x < \dfrac{\tau - \pi}{2}, \ 0 \iff x = - \sigma \text { or } x = \dfrac{\tau - \pi}{2}[/MATH], or [MATH]1 \iff x > \dfrac{\tau - \pi}{2}[/MATH]
I want to get all this information in a nice compact form because I need to derive the signs of

[MATH]p(x)\{q(x) + 2h(x)\}[/MATH] and [MATH]2\{g(x) + q(x) + h(x)\}, \text { where}\\ g(x) = \{p(x)\}^2, \ p(x) = x + \sigma, \ q(x) = g'(x)h'(x),\\ \text { and } h(x) = (x + \pi)(x - \tau).[/MATH]The table gives me a quick way to isolate the simple cases from the hard ones.

Oh, and [MATH]\sigma > \pi > 0 < \tau.[/MATH]
None of this is hard. Presenting it is the problem.
 
[MATH]\begin{array}{|c|c|c|c|} \hline \text {Signum} \T & -1 \T & 0 \T & 1\\\hline p(x) \T & x < - \sigma \T & x = - \sigma \T & x > - \sigma \T \\\hline \end{array}[/MATH]
OK Thanks Mark and pka. I think I see how it works
 
It looks great. Packs a lot in a presentation that is easy to grasp and validate.

[MATH]\text {Define } p(x) \equiv (x + \sigma), \ g(x) \equiv \{p(x)\}^2, \\ h(x) \equiv (x + \pi)(x - \tau), \text { and } q(x) \equiv p(x) * h'(x).[/MATH][MATH]h'(x) = (x + \pi) + (x - \tau) = 2x + \pi - \tau \implies h''(x) = 2.\\ g'(x) = 2p(x)(1) = 2p(x) = 2(x + \sigma) \implies g''(x) = 2.\\ \text {Note } g'(x)h'(x) = 2p(x)h'(x) = 2q(x).[/MATH][MATH]\text {By hypothesis, } \sigma > \pi > 0 < \tau \implies[/MATH]
[MATH]\begin{array}{|c|c|c|c|} \hline \text {Signum} & -1 & 0 & 1\\\hline p(x) & x < - \sigma & x = - \sigma & x > - \sigma \\\hline g(x) & & x = - \sigma & x \ne - \sigma \\\hline h(x) & - \pi < x < \tau & x = - \pi \text { or } \tau & x < - \pi \text { or } x > \tau \\\hline h'(x) & x < \dfrac{\tau - \pi}{2} & x =\dfrac{\tau - \pi}{2} & x > \dfrac{\tau - \pi}{2} \\\hline q(x) & - \sigma < x < \dfrac{\tau - \pi}{2} & x = - \sigma \text { or } \dfrac{\tau - \pi}{2} & x < - \sigma \text { or } x > \dfrac{\tau - \pi}{2} \\\hline \end{array}[/MATH]
 
Top