Right now, my document looks like this:
Or, like this:
It bothers me a lot that the equations are scattered all over the place and are not evenly aligned. I want, for example, each line be aligned on the left side with Problem 1 or Problem 2. Any suggestions?
\documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper an
\usepackage{amsmath,amsthm,amssymb}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=\bfseries Problem \arabic*:]
\item %PROBLEM 1
Find $\textbf{A}+\textbf{B}$, $\textbf{AB}$, $\textbf{BA}$.\\\\
a) $\textbf{A} = \begin{bmatrix} 1 & 2 \\ 3 & -1 \end{bmatrix}\,\,\,\,\,$ and $\,\,\,\,\,\textbf{B} = \begin{bmatrix} 2 & 1 \\1 & 1 \end{bmatrix}$. \,\,\,\,\,\textbf{A} is $2\times2$ and \textbf{B} is $2\times2$.
\[\textbf{A}+\textbf{B}=\begin{bmatrix} 1 & 2 \\ 3 & -1\end{bmatrix} + \begin{bmatrix} 2 & 1 \\1 & 1 \end{bmatrix}=\begin{bmatrix} 1+2 & 2+1 \\3+1 & -1+1 \end{bmatrix}=\begin{bmatrix} 3 & 3 \\4 & 0 \end{bmatrix}\]
\[\textbf{AB}=\begin{bmatrix} 1 & 2 \\ 3 & -1\end{bmatrix} \cdot \begin{bmatrix} 2 & 1 \\1 & 1 \end{bmatrix}=\begin{bmatrix} 1\cdot2+2\cdot1 & 1\cdot 1+2\cdot1 \\3\cdot2+(-1)\cdot1 & 3\cdot1+(-1)\cdot1 \end{bmatrix}=\begin{bmatrix} 4 & 3 \\5 & 2 \end{bmatrix}\]
\[\textbf{BA}= \begin{bmatrix} 2 & 1 \\1 & 1 \end{bmatrix}\cdot \begin{bmatrix} 1 & 2 \\ 3 & -1\end{bmatrix}=\begin{bmatrix} 2\cdot1+1\cdot3 & 2\cdot 2+1\cdot(-1) \\1\cdot1+1\cdot3 & 1\cdot2+1\cdot(-1) \end{bmatrix}=\begin{bmatrix} 5 & 3 \\4 & 1 \end{bmatrix}\]\\
b) $\textbf{A} = \begin{bmatrix} 2 & 3 & 1\\ 0 & -1 & 2 \end{bmatrix}\,\,\,\,\,$and
$\,\,\,\,\,\textbf{B} = \begin{bmatrix} 2 & -2 \\ 4 & 3 \\1 & 5 \end{bmatrix}$. \,\,\,\,\,\,\textbf{A} is $2\times3$ and \textbf{B} is $3\times2$.
$\textbf{A}+\textbf{B}$ is undefined because the two matrices are incompatible for addition.
\[ \textbf{AB}=\begin{bmatrix} 2 & 3 & 1\\ 0 & -1 & 2 \end{bmatrix}\cdot\begin{bmatrix} 2 & -2 \\ 4 & 3 \\1 & 5 \end{bmatrix}=\begin{bmatrix} 2\cdot2+3\cdot4+1\cdot1 & 2\cdot (-2)+3\cdot3+1\cdot 5 \\0\cdot2+(-1)\cdot4 +2\cdot 1 & 0\cdot(-2)+(-1)\cdot3 +2\cdot5 \end{bmatrix}=\begin{bmatrix} 17 & 10 \\-2 & 7 \end{bmatrix} \]
\[ \textbf{BA}=\begin{bmatrix} 2 & -2 \\ 4 & 3 \\1 & 5 \end{bmatrix}\cdot \begin{bmatrix} 2 & 3 & 1\\ 0 & -1 & 2 \end{bmatrix}=\begin{bmatrix} 2\cdot2+(-2)\cdot0 & 2\cdot 3+(-2)\cdot(1) &2\cdot1+(-2)\cdot 2 \\4\cdot2+3\cdot0&4\cdot3 +3\cdot (-1) & 4\cdot1+3\cdot2\\ 1\cdot2+5\cdot0&1\cdot3+5\cdot(-1)&1\cdot1+5\cdot2 \end{bmatrix}=\begin{bmatrix} 4 & 8&-2 \\8 & 9&10\\2&-2&11 \end{bmatrix} \]
\item %PROBLEM 2
Let $\textbf{a}' = \begin{bmatrix}
3 & 6 &-3 & 5 & 9& 2 \\
\end{bmatrix}$. Find \textbf{a}$'$\textbf{a} and \textbf{aa}$'$.
\textbf{a}$'$ is the transpose of $\textbf{a} = \begin{bmatrix}
3 \\ 6 \\-3 \\ 5 \\ 9\\ 2 \\
\end{bmatrix}$
\[\textbf{a}'\textbf{a} = \begin{bmatrix}
3 & 6 &-3 & 5 & 9& 2 \\
\end{bmatrix} \cdot \begin{bmatrix}
3 \\ 6 \\-3 \\ 5 \\ 9\\ 2 \\
\end{bmatrix} = \begin{bmatrix}
3^2 + 6^2 + (-3)^2 + 5^2 + 9^2 + 2^2 \\
\end{bmatrix} =[164] \]
\[\textbf{aa}' = \begin{bmatrix}
3 \\ 6 \\-3 \\ 5 \\ 9\\ 2 \\
\end{bmatrix}\cdot \begin{bmatrix}
3 & 6 &-3 & 5 & 9& 2 \\
\end{bmatrix} = \begin{bmatrix}
3^2& 3\cdot 6 & 3\cdot (-3) & 3\cdot 5 & 3\cdot 9 & 3\cdot 2 \\
6\cdot 3& 6^2 & 6\cdot (-3) & 6\cdot 5 & 6\cdot 9 & 6\cdot 2 \\
(-3)\cdot 3& (-3)\cdot 6 & (-3)^2 & (-3)\cdot 5 & (-3)\cdot 9 & (-3)\cdot 2 \\
5\cdot 3& 5\cdot 6 & 5\cdot (-3) & 5^2 & 5\cdot 9 & 5\cdot 2 \\
9\cdot 3& 9\cdot 6 & 9\cdot (-3) & 9\cdot 5 & 9^2 & 9\cdot 2 \\
2\cdot 3& 2\cdot 6 & 2\cdot (-3) & 2\cdot 5 & 2\cdot 9 & 2^2 \\
\end{bmatrix} \\=\begin{bmatrix}
9& 18 & 9 & 15 & 27 & 6 \\
18& 36 & -18 & 30 & 54 & 12 \\
-9& -18 & 9 & -15 & 27 & -6 \\
15& 30 & 15 & 10 & 45 & 10 \\
27& 54 & 27 & 45 & 81 & 18 \\
6& 12 & 6 & 10 & 18 & 4 \\
\end{bmatrix} \]
Let $\textbf{b}' = \begin{bmatrix}
1 & 1 & 1 & 1 & 1 & 1 \\
\end{bmatrix}\,\,\,\,\,$
and
$\,\,\,\,\,\textbf{c}' = \begin{bmatrix}
1 & -1 & 1 & -1 & 1 & -1 \\
\end{bmatrix}$. Find \textbf{b}$'$\textbf{c} and \textbf{bc}$'$.
\end{enumerate}
\end{document}
\textbf
to\mathbf
inside mathmode. Second, you can use\intertext
fromamsmath
or\shortintertext
frommathtools
.\shortintertext
gives lesser space than\intertext
.\[
but here you want to usealign*
it seems