I am new to this and so please excuse my ignorance.
I have an equation Ax = b, where A is a 3 x 3 matrix. Because some of the elements in the matrix A contain long expressions, latex is not able to fit the equation neatly across the page (it causes the equation number to overspill, see image below). I wish to avoid splitting the matrix A over two rows. Instead, I would like to split the (long) elements over two lines if possible such that the equation fits on one row across the page. Any help would be greatly appreciated. My code is as follows:
\documentclass[11pt]{book}
\usepackage{amsmath,amsfonts,amssymb,amsthm, bm}
\begin{document}
\begin{equation}
\begin{bmatrix}
\mathbf{i}_{w}\\
\mathbf{j}_{w}\\
\mathbf{k}_{w}
\end{bmatrix} = \begin{bmatrix}
\cos\gamma \cos\chi & \cos\gamma \sin\chi & -\sin\chi \\
\sin\mu \sin\gamma \cos\chi - \cos\mu \sin\chi & \sin\mu \sin\gamma \sin\chi + \cos\mu \cos\chi & \sin\mu \cos\gamma \\
\cos\mu \sin\gamma \cos\chi + \sin\mu \sin\chi & \cos\mu\sin\gamma\sin\chi-\sin\mu\cos\chi & \cos\mu\cos\gamma
\end{bmatrix} \begin{bmatrix}
\mathbf{i}_{h}\\
\mathbf{j}_{h}\\
\mathbf{k}_{h}
\end{bmatrix}
\end{equation}
\end{document}
Best Answer
You can nest
matrix
, giving some more room between the main rows.You can also align the columns, by replicating the contents with phantoms:
Now judge yourself about the aesthetics.