TransWikia.com

How to align the first line of the equation to the left?

TeX - LaTeX Asked by Learnmore on December 3, 2020

documentclass{article}
usepackage{amsmath}
begin{document}
begin{flalign*}
detbigg(lambda I -ABC(G_1circ G_2)bigg) 

=
left[
begin{array}{cccccccccccccccccccc}
A(G_2)otimes Q(G_1) otimes I_{n_2} &&  G^T
 
 G &&
A(G_1)otimes Q(G_2)otimes I_{n_1}
end{array}
right].
end{flalign*}    
end{document}

I am stuck at the following code.
I want the the first line i.e.

detbigg(lambda I -ABC(G_1circ G_2)bigg) 
    

to start from the left of the document.
But the problem is the first line is aligned to the right of the document which is making it look weird.

Is it possible to align everything to the left of the document?

Please help someone.

3 Answers

Why align everything left ? I would recommend using multlinehere

documentclass{article}
usepackage{mathtools}
begin{document}
begin{multline*}
detbigg(lambda I -ABC(G_1circ G_2)bigg)
=
left[
begin{array}{ccc}
A(G_2)otimes Q(G_1) otimes I_{n_2} &  G^T 
 G & A(G_1)otimes Q(G_2)otimes I_{n_1}
end{array}
right].
end{multline*}
end{document}

enter image description here

Answered by Denis on December 3, 2020

Two possibilities:

enter image description here

(red lines indicate text area borders)

documentclass{article}
usepackage{mathtools}
%---------------- show page layout. don't use in a real document!
usepackage{showframe}
renewcommandShowFrameLinethickness{0.15pt}
renewcommand*ShowFrameColor{color{red}}
%---------------------------------------------------------------%

begin{document}
    begin{align*}
detbiggl(lambda I -ABC(G_1circ G_2)biggr)    
    & = begin{bmatrix}
A(G_2)otimes Q(G_1) otimes I_{n_2} 
    &  G^T  
G   & A(G_1)otimes Q(G_2)otimes I_{n_1}
        end{bmatrix}.
    end{align*}
or with use of the verb+MoveEqLeft+ defined in the verb+mathtools+ package:
    begin{align*}
MoveEqLeft[4]detBigl(lambda I -ABC(G_1circ G_2)Bigr)    
    & = begin{bmatrix}
A(G_2)otimes Q(G_1) otimes I_{n_2}
    &  G^T  
G   & A(G_1)otimes Q(G_2)otimes I_{n_1}
        end{bmatrix}.
    end{align*}

Answered by Zarko on December 3, 2020

You only have to declare in the code at least two alignment columns. The flalign environment doesn't align on the left automagically.

I took the liberty to simplify your code: as I didn't see why an array with 20 columns – I replaced it with the simpler bmatrix environment. I also didn't see why the huge parentheses for the argument of det, so I replaced the pair bigg( ... bigg) with bigl( ... bigr) (note the final l and r).

documentclass{article}
usepackage{amsmath}
usepackage{showframe}
renewcommand{ShowFrameLinethickness}{0.2pt}

begin{document}

begin{flalign*}
detbigl(lambda I & -ABC(G_1circ G_2)bigr) & &
[0.5ex]
 & =
begin{bmatrix}
A(G_2)otimes Q(G_1) otimes I_{n_2} && G^T
 [1ex]
 G &&
A(G_1)otimes Q(G_2)otimes I_{n_1}
end{bmatrix}
end{flalign*}

end{document} 

enter image description here

Answered by Bernard on December 3, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP