Question about aligning equations
When using begin{align}end{align},do I use & or \, or both, to get equations to appear on successive lines
I have a number of equations I would like to appear on successive lines. E.g.
a=b
c=d
.
.
.
e=f
etc... lined up, like such.
mathjax
migrated from stackoverflow.com Jan 20 at 14:53
This question came from our site for professional and enthusiast programmers.
add a comment |
When using begin{align}end{align},do I use & or \, or both, to get equations to appear on successive lines
I have a number of equations I would like to appear on successive lines. E.g.
a=b
c=d
.
.
.
e=f
etc... lined up, like such.
mathjax
migrated from stackoverflow.com Jan 20 at 14:53
This question came from our site for professional and enthusiast programmers.
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27
add a comment |
When using begin{align}end{align},do I use & or \, or both, to get equations to appear on successive lines
I have a number of equations I would like to appear on successive lines. E.g.
a=b
c=d
.
.
.
e=f
etc... lined up, like such.
mathjax
When using begin{align}end{align},do I use & or \, or both, to get equations to appear on successive lines
I have a number of equations I would like to appear on successive lines. E.g.
a=b
c=d
.
.
.
e=f
etc... lined up, like such.
mathjax
mathjax
edited 9 mins ago
Chris Custer
asked Jan 19 at 7:20
Chris CusterChris Custer
1014
1014
migrated from stackoverflow.com Jan 20 at 14:53
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Jan 20 at 14:53
This question came from our site for professional and enthusiast programmers.
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27
add a comment |
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27
add a comment |
2 Answers
2
active
oldest
votes
align sets a display math environment where & is used as alignment points (and separation between alignments) while \ is used to separate equations vertically. It works similar to an array or tabular. You don't have to use & in an align, but \ is necessary to put equations on different lines.

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
f'(x) &= e^x (sin x + cos x) \
implies f''(x) &= 2e^x cos x \
implies f^3(x) &= 2e^x (cos x - sin x) \
implies f^4(x) &= 2e^x (-2sin x) = -4 f(x) \
implies f^5(x) &= -4 f'(x) \
implies f^8(x) &= -4 f^4(x) = 16 f(x) \
implies f^{10}(x) &= 16 f''(x)
end{align}
end{document}
If you're using MathJax, the same principle holds.
add a comment |
It looks as if both were used in this edit of one of my posts:
$begin{align}f'(x)&=e^x(sin x+cos x)\
implies f''(x)&=2e^xcos x\
implies f^3(x)&=2e^x(cos x-sin x)\
implies f^4(x)&=2e^x(-2sin x)=-4f(x)\
implies f^5(x)&=-4f'(x)\
implies f^8(x)&=-4f^4(x)=16f(x)\
implies f^{10}(x)&=16f''(x)end{align}$
I get the impression the &'s aren't really necessary, though. But when I took one '&' out, it didn't render (presumably I could take them all out).
1
This is wrong;begin{align}...end{align}should not appear inside math mode$...$as it sets itself as a display math construction already.
– Werner
Jan 19 at 19:28
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f471008%2fquestion-about-aligning-equations%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
align sets a display math environment where & is used as alignment points (and separation between alignments) while \ is used to separate equations vertically. It works similar to an array or tabular. You don't have to use & in an align, but \ is necessary to put equations on different lines.

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
f'(x) &= e^x (sin x + cos x) \
implies f''(x) &= 2e^x cos x \
implies f^3(x) &= 2e^x (cos x - sin x) \
implies f^4(x) &= 2e^x (-2sin x) = -4 f(x) \
implies f^5(x) &= -4 f'(x) \
implies f^8(x) &= -4 f^4(x) = 16 f(x) \
implies f^{10}(x) &= 16 f''(x)
end{align}
end{document}
If you're using MathJax, the same principle holds.
add a comment |
align sets a display math environment where & is used as alignment points (and separation between alignments) while \ is used to separate equations vertically. It works similar to an array or tabular. You don't have to use & in an align, but \ is necessary to put equations on different lines.

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
f'(x) &= e^x (sin x + cos x) \
implies f''(x) &= 2e^x cos x \
implies f^3(x) &= 2e^x (cos x - sin x) \
implies f^4(x) &= 2e^x (-2sin x) = -4 f(x) \
implies f^5(x) &= -4 f'(x) \
implies f^8(x) &= -4 f^4(x) = 16 f(x) \
implies f^{10}(x) &= 16 f''(x)
end{align}
end{document}
If you're using MathJax, the same principle holds.
add a comment |
align sets a display math environment where & is used as alignment points (and separation between alignments) while \ is used to separate equations vertically. It works similar to an array or tabular. You don't have to use & in an align, but \ is necessary to put equations on different lines.

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
f'(x) &= e^x (sin x + cos x) \
implies f''(x) &= 2e^x cos x \
implies f^3(x) &= 2e^x (cos x - sin x) \
implies f^4(x) &= 2e^x (-2sin x) = -4 f(x) \
implies f^5(x) &= -4 f'(x) \
implies f^8(x) &= -4 f^4(x) = 16 f(x) \
implies f^{10}(x) &= 16 f''(x)
end{align}
end{document}
If you're using MathJax, the same principle holds.
align sets a display math environment where & is used as alignment points (and separation between alignments) while \ is used to separate equations vertically. It works similar to an array or tabular. You don't have to use & in an align, but \ is necessary to put equations on different lines.

documentclass{article}
usepackage{amsmath}
begin{document}
begin{align}
f'(x) &= e^x (sin x + cos x) \
implies f''(x) &= 2e^x cos x \
implies f^3(x) &= 2e^x (cos x - sin x) \
implies f^4(x) &= 2e^x (-2sin x) = -4 f(x) \
implies f^5(x) &= -4 f'(x) \
implies f^8(x) &= -4 f^4(x) = 16 f(x) \
implies f^{10}(x) &= 16 f''(x)
end{align}
end{document}
If you're using MathJax, the same principle holds.
answered Jan 19 at 19:32
WernerWerner
444k689791680
444k689791680
add a comment |
add a comment |
It looks as if both were used in this edit of one of my posts:
$begin{align}f'(x)&=e^x(sin x+cos x)\
implies f''(x)&=2e^xcos x\
implies f^3(x)&=2e^x(cos x-sin x)\
implies f^4(x)&=2e^x(-2sin x)=-4f(x)\
implies f^5(x)&=-4f'(x)\
implies f^8(x)&=-4f^4(x)=16f(x)\
implies f^{10}(x)&=16f''(x)end{align}$
I get the impression the &'s aren't really necessary, though. But when I took one '&' out, it didn't render (presumably I could take them all out).
1
This is wrong;begin{align}...end{align}should not appear inside math mode$...$as it sets itself as a display math construction already.
– Werner
Jan 19 at 19:28
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
add a comment |
It looks as if both were used in this edit of one of my posts:
$begin{align}f'(x)&=e^x(sin x+cos x)\
implies f''(x)&=2e^xcos x\
implies f^3(x)&=2e^x(cos x-sin x)\
implies f^4(x)&=2e^x(-2sin x)=-4f(x)\
implies f^5(x)&=-4f'(x)\
implies f^8(x)&=-4f^4(x)=16f(x)\
implies f^{10}(x)&=16f''(x)end{align}$
I get the impression the &'s aren't really necessary, though. But when I took one '&' out, it didn't render (presumably I could take them all out).
1
This is wrong;begin{align}...end{align}should not appear inside math mode$...$as it sets itself as a display math construction already.
– Werner
Jan 19 at 19:28
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
add a comment |
It looks as if both were used in this edit of one of my posts:
$begin{align}f'(x)&=e^x(sin x+cos x)\
implies f''(x)&=2e^xcos x\
implies f^3(x)&=2e^x(cos x-sin x)\
implies f^4(x)&=2e^x(-2sin x)=-4f(x)\
implies f^5(x)&=-4f'(x)\
implies f^8(x)&=-4f^4(x)=16f(x)\
implies f^{10}(x)&=16f''(x)end{align}$
I get the impression the &'s aren't really necessary, though. But when I took one '&' out, it didn't render (presumably I could take them all out).
It looks as if both were used in this edit of one of my posts:
$begin{align}f'(x)&=e^x(sin x+cos x)\
implies f''(x)&=2e^xcos x\
implies f^3(x)&=2e^x(cos x-sin x)\
implies f^4(x)&=2e^x(-2sin x)=-4f(x)\
implies f^5(x)&=-4f'(x)\
implies f^8(x)&=-4f^4(x)=16f(x)\
implies f^{10}(x)&=16f''(x)end{align}$
I get the impression the &'s aren't really necessary, though. But when I took one '&' out, it didn't render (presumably I could take them all out).
answered Jan 19 at 7:43
Chris CusterChris Custer
1014
1014
1
This is wrong;begin{align}...end{align}should not appear inside math mode$...$as it sets itself as a display math construction already.
– Werner
Jan 19 at 19:28
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
add a comment |
1
This is wrong;begin{align}...end{align}should not appear inside math mode$...$as it sets itself as a display math construction already.
– Werner
Jan 19 at 19:28
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
1
1
This is wrong;
begin{align}...end{align} should not appear inside math mode $...$ as it sets itself as a display math construction already.– Werner
Jan 19 at 19:28
This is wrong;
begin{align}...end{align} should not appear inside math mode $...$ as it sets itself as a display math construction already.– Werner
Jan 19 at 19:28
1
1
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
You can verify this on Mathematics.
– Werner
Jan 19 at 19:35
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
Thanks for the heads up.
– Chris Custer
Jan 19 at 20:39
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f471008%2fquestion-about-aligning-equations%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you try both options (see title)? Please review writing the perfect question to help you to ask a good question, and thus get a good answer.
– Jeroen Heier
Jan 19 at 7:28
I did try both. It seems only " \" is necessary.
– Chris Custer
Jan 19 at 8:27