{"id":2773,"date":"2022-04-10T10:57:38","date_gmt":"2022-04-10T10:57:38","guid":{"rendered":"https:\/\/www.scijournal.org\/articles\/?p=2773"},"modified":"2022-07-14T02:42:01","modified_gmt":"2022-07-13T18:42:01","slug":"dot-product-in-latex","status":"publish","type":"post","link":"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex","title":{"rendered":"How to write a dot product in LaTeX"},"content":{"rendered":"\n<p><em>This article aims to show you a simple way to create a <\/em><em>dot symbol in LaTeX<\/em><em>.<\/em><\/p>\n\n\n\n<p>In physics and mathematics most of the time when you are working with vectors you will need to calculate the dot product of two vectors. That\u2019s why today you will learn how to write the dot product in LaTeX<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_67_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a0d5e886a050\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a0d5e886a050\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\/#Dot_Product\" title=\"Dot Product\">Dot Product<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\/#Dot_Operator_Symbol_in_LaTeX\" title=\"Dot Operator Symbol in LaTeX\">Dot Operator Symbol in LaTeX<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\/#Dot_product_AngleVectorMatrix_form\" title=\"Dot product Angle\/Vector\/Matrix form\">Dot product Angle\/Vector\/Matrix form<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\/#Triple_Vector_product\" title=\"Triple Vector product\">Triple Vector product<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\/#Further_Reading\" title=\"Further Reading\">Further Reading<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dot_Product\"><\/span><strong>Dot Product<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let\u2019s begin with two vectors <strong>A<\/strong> and<strong> B<\/strong>, the dot product is defined as the multiplication of two given vectors that results in a positive real number also known as scalar. That means that you get a number rather than a vector.&nbsp;<\/p>\n\n\n\n<p>The dot product of A and B is represent with a dot symbol between both vectors, for example<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"147\" height=\"72\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image3-11.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2774\"\/><figcaption>Multiplication dot symbol, a single point<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dot_Operator_Symbol_in_LaTeX\"><\/span><strong>Dot Operator Symbol in LaTeX<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To write the dot operator symbol, you will need the math mode and one simple command, the \\cdot command, and as you can see it does not need arguments. Since the command is already in LaTeX, you don\u2019t need any extra package for it.&nbsp;<\/p>\n\n\n\n<p>Let\u2019s say we have to vectors U and V, the dot product will be<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\begin{document}\n  $$\\vec{U} \\cdot \\vec{V}$$\n\\end{document}\n<\/pre><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"153\" height=\"75\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-6.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2775\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-6.png 153w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-6-150x75.png 150w\" sizes=\"(max-width: 153px) 100vw, 153px\" \/><figcaption>\\cdot command output<\/figcaption><\/figure><\/div>\n\n\n<p>One variation that you could need, is the vectors with bold font and with the arrow mark, once again without packages.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\begin{document}\n  $$\\vec{\\mathbf{U}} \\cdot \\vec{\\mathbf{V}}$$\n\\end{document}\n<\/pre><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"153\" height=\"75\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-7.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2776\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-7.png 153w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image5-7-150x75.png 150w\" sizes=\"(max-width: 153px) 100vw, 153px\" \/><figcaption>Bold symbols with the dot product character<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Dot_product_AngleVectorMatrix_form\"><\/span><strong>Dot product Angle\/Vector\/Matrix form<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now the dot product between two vectors can have 3 main representations, each one can be used depending on the context, and they can be inserted in LaTeX. Below you will have examples for each one of them.<\/p>\n\n\n\n<p>The first form (<strong>Angle Form<\/strong>) involves the angle theta between the vectors, therefore you will need the \\theta command and the symbol for the norm of the vector, all of them must be inside the math mode. For example, given R and B the dot product in angle form would be,<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\begin{document}\n$$\\vec{R} \\cdot \\vec{B} = \\Vert\\vec{R}\\Vert \\Vert\\vec{B}\\Vert \\cos(\\theta)$$\n\\end{document}\n<\/pre><\/div>\n\n\n<p>Gives the output<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"76\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image4-9.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2777\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image4-9.png 365w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image4-9-300x62.png 300w\" sizes=\"(max-width: 365px) 100vw, 365px\" \/><\/figure><\/div>\n\n\n<p>The second form (<strong>Vector Form<\/strong>) is more used when you know each component of two vectors with the same size, it is pretty common in physics to multiply two vectors using this form. Requires the math mode.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\begin{document}\n    $$\\vec{a}=(x_{1}\\hat{i}+y_{1}\\hat{i}+z_{1}\\hat{i})$$\n    $$\\vec{b}=(x_{2}\\hat{i}+y_{2}\\hat{i}+z_{2}\\hat{i})$$\n    \\vspace{2pt}\n    $$\\vec{a}\\cdot\\vec{b}=x_{1}x_{2}+y_{1}y_{2}+z_{1}z_{2}$$\n\\end{document}\n<\/pre><\/div>\n\n\n<p>Gives the output<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"221\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image1-13.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2778\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image1-13.png 398w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image1-13-300x167.png 300w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/><\/figure><\/div>\n\n\n<p>The third and last form (<strong>Matrix Form<\/strong>) is more common in linear algebra, when you are working with vectors. You will need to use the pmatrix (math mode required) environment, and \\\\ and &amp; for the rows and columns, let\u2019s see it in an example<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\usepackage{amsmath}\n\\begin{document}\n    Given $\\vec{R}$ and $\\vec{B}$, the dot product is defined as\n    $$\\vec{R}\\cdot\\vec{B}=\\begin{pmatrix} x_{1} &amp; y_{1} &amp; z_{1}\n    \\end{pmatrix}\n    \\begin{pmatrix} x_{2}\\\\ y_{2}\\\\ z_{2} \\end{pmatrix}$$\n\\end{document}\n<\/pre><\/div>\n\n\n<p>We use &amp; to determine the position of each new column, and \\<strong>\\<\/strong> for the position of each row or line. The only thing to take notice of is the need of the amsmath package for the pmatrix environment, but usually this package does not have any trouble with compatibility with other packages. The code above gives the output<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"223\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image6-6.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2779\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image6-6.png 662w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image6-6-300x101.png 300w\" sizes=\"(max-width: 662px) 100vw, 662px\" \/><figcaption>The result would be represented after multiplying both matrices, and adding their values.&nbsp;<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Triple_Vector_product\"><\/span><strong>Triple Vector product<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Given three vectors A, B and C you can perform what it is called, the triple vector product. It involves the dot product operation and the vector product operation.&nbsp;<\/p>\n\n\n\n<p>The triple vector product is defined as<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\begin{document}\n$\\vec{A}\\cdot(\\vec{B}\\times\\vec{C}\\,)$\n\\end{document}\n<\/pre><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"224\" height=\"84\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/04\/image2-11.png\" alt=\"dot product in LaTeX\" class=\"wp-image-2780\"\/><figcaption>Triple vector product<\/figcaption><\/figure><\/div>\n\n\n<p>The result of the triple product vector is a scalar number, but in this case, it represents the area of a geometrical figure.<\/p>\n\n\n\n<p>Now you know how to insert the dot symbols used for the dot product in your LaTeX documents, and some forms you may encounter in textbooks. Maybe you already notice it but it is just the normal multiplication sign<\/p>\n\n\n\n<p>I hope this tutorial was helpful in guiding you in LaTeX, and as always keep writing in LaTeX<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Further_Reading\"><\/span><strong>Further Reading<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>LaTex Tutorial<\/strong> <strong>on Symbols<\/strong><\/p>\n\n\n\n<ol><li><a href=\"https:\/\/www.scijournal.org\/articles\/cross-product-symbol-in-latex\">How To Create A Cross Product Symbol In LaTeX<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/hat-symbol-in-latex\">How to create a hat symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/prime-symbol-in-latex\">How to create a prime symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/absolute-value-symbol-in-latex\">How to create an absolute value symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/approximate-symbol-in-latex\">How to create an approximate symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/intersection-symbol-in-latex\">How to create an intersection symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/empty-set-symbol-in-latex\">How to create the empty set symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/degree-symbol-in-latex\">How to write a degree symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/greater-than-symbol-in-latex\">How to Write a Greater Than Symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/norm-symbol-in-latex\">How to write a norm symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/plus-minus-symbol-in-latex\">How to write A Plus-Minus Symbol in LaTeX<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/proportional-to-symbol-in-latex\">How to write a proportional to symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/real-number-symbol-in-latex\">How to write a real number symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/tilde-symbol-in-latex\">How to write a tilde symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/union-symbol-in-latex\">How to write a union symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/vector-in-latex\">How to write a vector in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/infinity-symbol-in-latex\">How to write an infinity symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/bold-text-in-latex\">How to write bold text in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/dots-symbols-in-latex\">How To Write Dots Symbols In LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/arrow-symbols-in-latex\">How to write the arrow symbols in LaTeX<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/degree-celsius-symbol-in-latex\">How to write the Degree celsius symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/equal-or-not-equal-symbol-in-latex\">How to write the equal or not equal symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/euro-symbol-in-latex\">How to write the Euro symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/floor-symbol-in-latex\">How to write the floor symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/gradient-operator-symbol-in-latex\">How to write the gradient operator symbol in LaTeX<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/greater-than-or-equal-to-symbol-in-latex\">How To Write The Greater Than Or Equal To Symbol In LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/integer-number-symbol-in-latex\">How to write the integer number symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/less-than-symbol-in-latex\">How to write the less than symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/natural-numbers-symbol-in-latex\">How to write the Natural numbers symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/parallel-symbol-in-latex\">How to write the parallel symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/percent-symbol-in-latex\">How to write the percent symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/square-root-symbol-in-latex\">How to write the square root symbol in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/subset-in-latex\">How To Write The Symbol For A Subset In LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/therefore-in-latex\">How to write the symbol for therefore in LaTeX?<\/a><\/li><li><a href=\"https:\/\/www.scijournal.org\/articles\/mathbb-command-in-latex\">How to write with the mathbb in LaTeX?<\/a><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This article aims to show you a simple way to create a dot symbol in LaTeX. In physics and mathematics most of the time when you are working with vectors you will need to calculate the dot product of two vectors. That\u2019s why today you will learn how to write the dot product in LaTeX &#8230; <a title=\"How to write a dot product in LaTeX\" class=\"read-more\" href=\"https:\/\/www.scijournal.org\/articles\/dot-product-in-latex\" aria-label=\"Read more about How to write a dot product in LaTeX\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":2781,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[39],"_links":{"self":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/2773"}],"collection":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/comments?post=2773"}],"version-history":[{"count":4,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/2773\/revisions"}],"predecessor-version":[{"id":5613,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/2773\/revisions\/5613"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/media\/2781"}],"wp:attachment":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/media?parent=2773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/categories?post=2773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/tags?post=2773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}