# matrix alignment problem

I am not able to align the righthand side matrix.

\documentclass[a4paper,12pt,reqno]{amsart}
\usepackage{amssymb,amsthm}
\usepackage{ifthen}
\usepackage{graphicx}
\usepackage{float}
\usepackage{arydshln}
\begin{document}
$\left[ \begin{array}{c@{}c@{}c@{}c@{}c} & \vdots & \\ \begin{array}{c} \mbox{\LARGE {Q}} \end{array} & 0 & \begin{array}{c} \mbox{\LARGE {O}} \end{array} \\ \begin{matrix} \cdots & 0& u_0 \end{matrix} & \begin{array}{c} u_{-1}\\ d_0\\ l_1 \end{array} & \begin{matrix} c_0 & 0 & \cdots \end{matrix}\\ \mbox{\LARGE {O}} & 0 & \begin{array}{c} \mbox{\LARGE {S}} \end{array} \\ & \vdots & \\ \end{array}\right] \left[\begin{array}{c} x_-\\ x_0\\ x_+ \end{array}\right] = \left[\begin{array}{c} y_-\\ y_0\\ y_+ \end{array}\right]$
\end{document}

• I am not able to align the righthand side matrix. – sarvesh kumar May 9 '18 at 5:57
• welcome to tex.se! how is your question related to latex3 ( i don't see any to it specific code in your code fragment)? matrix is centered in text width. what is the problem? please, extend your code snippet to complete small document beginning with \documentclass{<class name>} and ending with \end{document}. – Zarko May 9 '18 at 5:57
• you also should add document class and preamble ... end also correct code. it has error (missing \endgroup) – Zarko May 9 '18 at 5:59
• Code is correct..it is working in texmaker.. – sarvesh kumar May 9 '18 at 6:03

this is more comment than an answer ...

after cleaning up your code to:

\documentclass[a4paper,12pt,reqno]{amsart}

\begin{document}
$\begin{bmatrix} & & & \vdots & & & \\ & \mbox{\LARGE {Q}} & & 0 & & \mbox{\LARGE {O}} & \\ & & & u_1 & & & \\ \cdots & 0 & u_0 & d_0 & c_0 & 0 & \cdots \\ & & & l_1 & & & \\ & \mbox{\LARGE {O}} & & 0 & & \mbox{\LARGE {Q}} & \\ & & & \vdots & & & \\ \end{bmatrix} \begin{bmatrix} x_-\\ x_0\\ x_+ \end{bmatrix} = \begin{bmatrix} y_-\\ y_0\\ y_+ \end{bmatrix}$
\end{document}


i obtain

which is as i see perfectly aligned.

note: i use \begin{bmatrix} instead your construct \lef[\begin{array} and remove all inner matrices. code gives the same result, however it is much shorter and clearer.