# 'Long (or vertical) multiplication of polynomials (Long rule for multiplication)'

(1). How may I multiply the two polynomials vertically?

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{array}
\usepackage{booktabs}
\usepackage{polynom}
\newcommand*{\Ph}{\hphantom{)}}%

\begin{document}
Example-(01) The distribution of the following product is arranged.
\begin{flalign*}
(x^{3}+2x^{2}+2x+1)(x^{2}-x+1)
\end{flalign*}
$\begin{array}{r@{} r@{} r r} x^3&{}+2x^2&{}+2x+ 4 \\ \times(x^2&{}-x+1) &\\ \cmidrule{1-3} \end{array}$
\end{document}

• Either I forgot math learned at University or I am misunderstanding the question: Multiplication versus Long Division? – user31729 Feb 28 '15 at 10:59
• @ChristianHupfer I apologise for inconvenience caused. What I meant was vertical multiplication. I edited my question. I think now the question is clear. Thank you for the improvement. – Nisal Kevin Kotinkaduwa Feb 28 '15 at 11:03
• how would you like it to look? – Steven B. Segletes Feb 28 '15 at 13:33
• The answers to How can I make a scheme to multiply polynomials? can give you some ideas. – Gonzalo Medina Feb 28 '15 at 14:43