align equation, matrix and table
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I need to align this equation as
I recreated it by using equation , matrix and tabular environment.
beginequation hatJ_x leftrightarrow frachbar2
beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix
endequation
getting this but I need the first part of the equation to be aligned on the top left. Also the alignment in the table is a bit off. Any ideas?
tables align matrices
add a comment |Â
up vote
4
down vote
favorite
I need to align this equation as
I recreated it by using equation , matrix and tabular environment.
beginequation hatJ_x leftrightarrow frachbar2
beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix
endequation
getting this but I need the first part of the equation to be aligned on the top left. Also the alignment in the table is a bit off. Any ideas?
tables align matrices
Don't usetabular
butarray
(essentially the same astabular
but for maths).
– Skillmon
40 mins ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I need to align this equation as
I recreated it by using equation , matrix and tabular environment.
beginequation hatJ_x leftrightarrow frachbar2
beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix
endequation
getting this but I need the first part of the equation to be aligned on the top left. Also the alignment in the table is a bit off. Any ideas?
tables align matrices
I need to align this equation as
I recreated it by using equation , matrix and tabular environment.
beginequation hatJ_x leftrightarrow frachbar2
beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix
endequation
getting this but I need the first part of the equation to be aligned on the top left. Also the alignment in the table is a bit off. Any ideas?
tables align matrices
tables align matrices
edited 44 mins ago


Skillmon
18.8k11637
18.8k11637
asked 51 mins ago


Evan
734
734
Don't usetabular
butarray
(essentially the same astabular
but for maths).
– Skillmon
40 mins ago
add a comment |Â
Don't usetabular
butarray
(essentially the same astabular
but for maths).
– Skillmon
40 mins ago
Don't use
tabular
but array
(essentially the same as tabular
but for maths).– Skillmon
40 mins ago
Don't use
tabular
but array
(essentially the same as tabular
but for maths).– Skillmon
40 mins ago
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
3
down vote
You can use delarray
for top aligning the matrix and gathered
for centering the equation number.
documentclassarticle
usepackageamsmath
usepackagedelarray
begindocument
beginequation
begingathered
hatJ_x leftrightarrow frachbar2
beginarray[t]( c )
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarray
endgathered
endequation
enddocument
Nesting matrices is much easier than abusing multirow
.
Removing gathered
yields
On the other hand, I don't think this is really clear.
In case you change your mind:
documentclassarticle
usepackageamsmath
begindocument
beginequation
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can obtain a more open look by setting extrarowheight
. I'll only show it added to the last code, the method applies the same for the other two examples.
documentclassarticle
usepackageamsmath
usepackagearray
begindocument
beginequation
setlengthextrarowheight2pt
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
1
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
add a comment |Â
up vote
1
down vote
You can use raisebox-height
to lower the box to move it below the baseline and raiseboxdimexpr-height+baselineskiprelax
to get it on the correct height:
documentclassarticle
usepackageamsmath
usepackagemultirow
begindocument
beginequation hatJ_x leftrightarrow frachbar2
raiseboxdimexpr-height+baselineskiprelax
%
$beginpmatrix
beginarray c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 sqrt2 0 & multirow3*0 \ & & sqrt2 0 sqrt2 & \ & & 0 sqrt2 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 sqrt3 0 0 & \
& & & sqrt3 0 2 0 & \
& & & 0 2 0 sqrt3 & \
& & & 0 0 sqrt3 0& \ hline
& & & & ddots \
endarray
endpmatrix$%
endequation
enddocument
add a comment |Â
up vote
1
down vote
If you want the eq number aligned with the top, then just place the pmatrix
in a belowbaseline[-htstrutbox]...
.
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation hatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$
endequation
enddocument
If you want the number centered, then just wrap the whole thing in a vcenterhbox$displaystyle...$
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation vcenterhbox$displaystylehatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$$
endequation
enddocument
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You can use delarray
for top aligning the matrix and gathered
for centering the equation number.
documentclassarticle
usepackageamsmath
usepackagedelarray
begindocument
beginequation
begingathered
hatJ_x leftrightarrow frachbar2
beginarray[t]( c )
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarray
endgathered
endequation
enddocument
Nesting matrices is much easier than abusing multirow
.
Removing gathered
yields
On the other hand, I don't think this is really clear.
In case you change your mind:
documentclassarticle
usepackageamsmath
begindocument
beginequation
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can obtain a more open look by setting extrarowheight
. I'll only show it added to the last code, the method applies the same for the other two examples.
documentclassarticle
usepackageamsmath
usepackagearray
begindocument
beginequation
setlengthextrarowheight2pt
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
1
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
add a comment |Â
up vote
3
down vote
You can use delarray
for top aligning the matrix and gathered
for centering the equation number.
documentclassarticle
usepackageamsmath
usepackagedelarray
begindocument
beginequation
begingathered
hatJ_x leftrightarrow frachbar2
beginarray[t]( c )
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarray
endgathered
endequation
enddocument
Nesting matrices is much easier than abusing multirow
.
Removing gathered
yields
On the other hand, I don't think this is really clear.
In case you change your mind:
documentclassarticle
usepackageamsmath
begindocument
beginequation
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can obtain a more open look by setting extrarowheight
. I'll only show it added to the last code, the method applies the same for the other two examples.
documentclassarticle
usepackageamsmath
usepackagearray
begindocument
beginequation
setlengthextrarowheight2pt
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
1
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You can use delarray
for top aligning the matrix and gathered
for centering the equation number.
documentclassarticle
usepackageamsmath
usepackagedelarray
begindocument
beginequation
begingathered
hatJ_x leftrightarrow frachbar2
beginarray[t]( c )
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarray
endgathered
endequation
enddocument
Nesting matrices is much easier than abusing multirow
.
Removing gathered
yields
On the other hand, I don't think this is really clear.
In case you change your mind:
documentclassarticle
usepackageamsmath
begindocument
beginequation
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can obtain a more open look by setting extrarowheight
. I'll only show it added to the last code, the method applies the same for the other two examples.
documentclassarticle
usepackageamsmath
usepackagearray
begindocument
beginequation
setlengthextrarowheight2pt
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can use delarray
for top aligning the matrix and gathered
for centering the equation number.
documentclassarticle
usepackageamsmath
usepackagedelarray
begindocument
beginequation
begingathered
hatJ_x leftrightarrow frachbar2
beginarray[t]( c )
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarray
endgathered
endequation
enddocument
Nesting matrices is much easier than abusing multirow
.
Removing gathered
yields
On the other hand, I don't think this is really clear.
In case you change your mind:
documentclassarticle
usepackageamsmath
begindocument
beginequation
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
You can obtain a more open look by setting extrarowheight
. I'll only show it added to the last code, the method applies the same for the other two examples.
documentclassarticle
usepackageamsmath
usepackagearray
begindocument
beginequation
setlengthextrarowheight2pt
hatJ_x leftrightarrow frachbar2
left(beginarray c
0 & 0 & 0 & 0 & vphantomBig \
hline
0 & beginmatrix 1 & 0 \ 0 & 1endmatrix & 0 & & \
hline
0 & 0 & beginmatrix
0 & sqrt2 & 0 \
sqrt2 & 0 & sqrt2 \
0 & sqrt2 & 0
endmatrix & 0 & \
hline
0 & 0 & 0 & beginmatrix
0 & sqrt3 & 0 & 0 \
sqrt3 & 0 & 2 & 0 \
0 & 2 & 0 & sqrt3 \
0 & 0 & sqrt3 & 0
endmatrix & \
hline
& & & & ddots
endarrayright)
endequation
enddocument
edited 4 mins ago
answered 30 mins ago


egreg
686k8418283077
686k8418283077
1
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
add a comment |Â
1
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
1
1
@Mico Done in a different way
– egreg
4 mins ago
@Mico Done in a different way
– egreg
4 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
your first answer looks exactly like what I want but the ( ) after the beginarray don't work.
– Evan
2 mins ago
add a comment |Â
up vote
1
down vote
You can use raisebox-height
to lower the box to move it below the baseline and raiseboxdimexpr-height+baselineskiprelax
to get it on the correct height:
documentclassarticle
usepackageamsmath
usepackagemultirow
begindocument
beginequation hatJ_x leftrightarrow frachbar2
raiseboxdimexpr-height+baselineskiprelax
%
$beginpmatrix
beginarray c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 sqrt2 0 & multirow3*0 \ & & sqrt2 0 sqrt2 & \ & & 0 sqrt2 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 sqrt3 0 0 & \
& & & sqrt3 0 2 0 & \
& & & 0 2 0 sqrt3 & \
& & & 0 0 sqrt3 0& \ hline
& & & & ddots \
endarray
endpmatrix$%
endequation
enddocument
add a comment |Â
up vote
1
down vote
You can use raisebox-height
to lower the box to move it below the baseline and raiseboxdimexpr-height+baselineskiprelax
to get it on the correct height:
documentclassarticle
usepackageamsmath
usepackagemultirow
begindocument
beginequation hatJ_x leftrightarrow frachbar2
raiseboxdimexpr-height+baselineskiprelax
%
$beginpmatrix
beginarray c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 sqrt2 0 & multirow3*0 \ & & sqrt2 0 sqrt2 & \ & & 0 sqrt2 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 sqrt3 0 0 & \
& & & sqrt3 0 2 0 & \
& & & 0 2 0 sqrt3 & \
& & & 0 0 sqrt3 0& \ hline
& & & & ddots \
endarray
endpmatrix$%
endequation
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can use raisebox-height
to lower the box to move it below the baseline and raiseboxdimexpr-height+baselineskiprelax
to get it on the correct height:
documentclassarticle
usepackageamsmath
usepackagemultirow
begindocument
beginequation hatJ_x leftrightarrow frachbar2
raiseboxdimexpr-height+baselineskiprelax
%
$beginpmatrix
beginarray c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 sqrt2 0 & multirow3*0 \ & & sqrt2 0 sqrt2 & \ & & 0 sqrt2 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 sqrt3 0 0 & \
& & & sqrt3 0 2 0 & \
& & & 0 2 0 sqrt3 & \
& & & 0 0 sqrt3 0& \ hline
& & & & ddots \
endarray
endpmatrix$%
endequation
enddocument
You can use raisebox-height
to lower the box to move it below the baseline and raiseboxdimexpr-height+baselineskiprelax
to get it on the correct height:
documentclassarticle
usepackageamsmath
usepackagemultirow
begindocument
beginequation hatJ_x leftrightarrow frachbar2
raiseboxdimexpr-height+baselineskiprelax
%
$beginpmatrix
beginarray c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 sqrt2 0 & multirow3*0 \ & & sqrt2 0 sqrt2 & \ & & 0 sqrt2 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 sqrt3 0 0 & \
& & & sqrt3 0 2 0 & \
& & & 0 2 0 sqrt3 & \
& & & 0 0 sqrt3 0& \ hline
& & & & ddots \
endarray
endpmatrix$%
endequation
enddocument
answered 24 mins ago


Skillmon
18.8k11637
18.8k11637
add a comment |Â
add a comment |Â
up vote
1
down vote
If you want the eq number aligned with the top, then just place the pmatrix
in a belowbaseline[-htstrutbox]...
.
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation hatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$
endequation
enddocument
If you want the number centered, then just wrap the whole thing in a vcenterhbox$displaystyle...$
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation vcenterhbox$displaystylehatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$$
endequation
enddocument
add a comment |Â
up vote
1
down vote
If you want the eq number aligned with the top, then just place the pmatrix
in a belowbaseline[-htstrutbox]...
.
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation hatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$
endequation
enddocument
If you want the number centered, then just wrap the whole thing in a vcenterhbox$displaystyle...$
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation vcenterhbox$displaystylehatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$$
endequation
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
If you want the eq number aligned with the top, then just place the pmatrix
in a belowbaseline[-htstrutbox]...
.
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation hatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$
endequation
enddocument
If you want the number centered, then just wrap the whole thing in a vcenterhbox$displaystyle...$
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation vcenterhbox$displaystylehatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$$
endequation
enddocument
If you want the eq number aligned with the top, then just place the pmatrix
in a belowbaseline[-htstrutbox]...
.
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation hatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$
endequation
enddocument
If you want the number centered, then just wrap the whole thing in a vcenterhbox$displaystyle...$
documentclassarticle
usepackageamsmath,multirow,stackengine
begindocument
beginequation vcenterhbox$displaystylehatJ_x leftrightarrow frachbar2
belowbaseline[-htstrutbox]$beginpmatrix
begintabular c
0 & 0 & 0 & 0 & \ hline
multirow2*0 & 0 1 & multirow2*0 & multirow2*0 \ & 1 0 & & \ hline
multirow3*0 & multirow3*0 & 0 $sqrt2$ 0 & multirow3*0 \ & & $sqrt2$ 0 $sqrt2$ & \ & & 0 $sqrt2$ 0 & \ hline
multirow4*0 & multirow4*0 & multirow4*0 & 0 $sqrt3$ 0 0 & \
& & & $sqrt3$ 0 2 0 & \
& & & 0 2 0 $sqrt3$ & \
& & & 0 0 $sqrt3$ 0& \ hline
& & & & $ddots$ \
endtabular
endpmatrix$$
endequation
enddocument
edited 3 mins ago
answered 33 mins ago


Steven B. Segletes
147k9186390
147k9186390
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f453300%2falign-equation-matrix-and-table%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Don't use
tabular
butarray
(essentially the same astabular
but for maths).– Skillmon
40 mins ago