$\left(a+b\right)\left(c+d\right)=ac+ad+bc+bd$
Asked
Active
Viewed 361 times
1
-
2Related/duplicate: Better solution to display the Distributive Property; Draw arrows to show multiplication pattern (distributive property); How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)? – Werner Aug 16 '21 at 16:04
-
@Werner thanks sir. But not same this picture. – Баярбаатар Сүрэнжав Aug 16 '21 at 16:07
1 Answers
7
Here's a solution using tikzmark library, instead of reinventing the wheel, like many old solutions you can find here.
\documentclass[12pt]{article}
\usepackage{tikz,amsmath}
\usetikzlibrary{tikzmark}
\begin{document}
\tikzset{
every node/.style={outer sep=1pt},
num/.style={draw,circle,fill=white,font=\tiny,inner sep=1pt}}
\[
(\tikzmarknode{A}{a}+\tikzmarknode{B}{b})(\tikzmarknode{C}{c}+\tikzmarknode{D}{d})=\tikzmarknode{AC}{ac}+\tikzmarknode{AD}{ad}+\tikzmarknode{BC}{bc}+\tikzmarknode{BD}{bd}
\]
\begin{tikzpicture}[remember picture, overlay,cyan]
\draw[->] (A) to[out=60,in=100,looseness=1.5] node[num,pos=0.5] {1} (C) ;
\draw[->] (A) to[out=60,in=110,looseness=1.8] node[num,pos=0.5] {2} (D) ;
\draw[->] (B) to[out=-90,in=-100,looseness=1.6] node[num,pos=0.5] {3} (C) ;
\draw[->] (B) to[out=-90,in=-110,looseness=1.9] node[num,pos=0.5] {4} (D) ;
\foreach \n [count=\i] in {AC,AD,BC,BD}
\node[num,above=10pt] at (\n.south) {\i};
\end{tikzpicture}
\end{document}
SebGlav
- 19,186
-
3
-
Hi. I am trying to do this for the following -> a(b + c) but I am honestly a little lost and there is constantly some error! Can you please help!? Thank you. – user292225 Apr 21 '23 at 10:03

