{"id":4127,"date":"2022-06-03T15:19:37","date_gmt":"2022-06-03T07:19:37","guid":{"rendered":"https:\/\/www.scijournal.org\/articles\/?p=4127"},"modified":"2022-07-14T03:04:47","modified_gmt":"2022-07-13T19:04:47","slug":"equal-or-not-equal-symbol-in-latex","status":"publish","type":"post","link":"https:\/\/www.scijournal.org\/articles\/equal-or-not-equal-symbol-in-latex","title":{"rendered":"How to write the equal or not equal symbol in LaTeX?"},"content":{"rendered":"\n<p><em>This article aims to show you the simplest and easiest way to write the <\/em><em>equal or not equal symbol in LaTeX<\/em><em>.<\/em><\/p>\n\n\n\n<p>A very common symbol used in mathematics and computer programming, with many more uses in spelling, linguistics and chemistry. Today you will learn how to insert it in your LaTeX document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Equal or not Equal Symbols<\/strong><\/h2>\n\n\n\n<p>Either called <strong>equal sign<\/strong>, <strong>equality sign<\/strong>, or <strong>equal symbol<\/strong>, is primarily used in mathematics to indicate an equality in a well-defined context, let\u2019s say for example that two things are equivalent between them. It is represented by two horizontal parallel lines that place between the values,<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"258\" height=\"76\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image2-1.png\" alt=\"Equal Or Not Equal Symbol In Latex : Equality symbol\" class=\"wp-image-4129\"\/><figcaption>Equality symbol<\/figcaption><\/figure><\/div>\n\n\n<p>Usually in math we used the equal sign in equations to denote that two things are equals. We can also call this equality, a relation between two values.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"245\" height=\"88\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image4-1.png\" alt=\"Equal Or Not Equal Symbol In Latex : Left side equals the right side\" class=\"wp-image-4130\"\/><figcaption>Left side equals the right side<\/figcaption><\/figure><\/div>\n\n\n<p>In case the equality is false -the two things are not equivalent- we used the not equal symbol\/sign, it looks like the equal sign but instead of only two horizontal lines, it has a diagonal slash between the two lines.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"187\" height=\"73\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image1-1.png\" alt=\"Equal Or Not Equal Symbol In Latex : A value represented is not equal to another one\" class=\"wp-image-4131\"\/><figcaption>A value represented is not equal to another one<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Equal or not Equal Symbol in LaTeX<\/strong><\/h2>\n\n\n\n<p>To write the equal symbol in LaTeX you don\u2019t need any command, it is already written in your keyboard, using the \u201c=\u201d you get the desired symbol. Either in math mode or text mode, it works the same.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\begin{document}\n\\begin{center}\n\u00a0 \u00a0 Equal symbol in text mode: 1=1 \\\\\n\u00a0 \u00a0 Equal symbol in math mode: $a=b$\n\\end{center}\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=\"599\" height=\"113\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image6.png\" alt=\"Equal Or Not Equal Symbol In Latex : Equal symbol in text and math mode\" class=\"wp-image-4132\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image6.png 599w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image6-300x57.png 300w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><figcaption>Equal symbol in text and math mode<\/figcaption><\/figure><\/div>\n\n\n<p>Note: notice the difference in spacing between math mode and text mode.<\/p>\n\n\n\n<p>Now regarding the not equal symbol, this time we don\u2019t have such luck. The main difference between the \u201c<strong>not equal to<\/strong>\u201d and the \u201c<strong>equal to<\/strong>\u201d symbols is the former requires math mode, the latter does not.<\/p>\n\n\n\n<p>To write it in LaTeX we have two commands we can use, either \\<strong>neq<\/strong> or \\<strong>ne<\/strong>, both work fine and generate the same symbol.&nbsp;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\begin{document}\n\\begin{center}\n\u00a0 \u00a0 Not equal symbol \\verb|\\neq|: $x \\neq y$ %two variables are not equal \\\\\n\u00a0 \u00a0 Not equal symbol \\verb|\\ne|: $42 \\ne 41$ %two numbers are not equal\n\\end{center}\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=\"536\" height=\"117\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image3-1.png\" alt=\"Equal Or Not Equal Symbol In Latex : Not equal commands\" class=\"wp-image-4133\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image3-1.png 536w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image3-1-300x65.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><figcaption>Not equal commands<\/figcaption><\/figure><\/div>\n\n\n<p>Going the extra mile, sometimes you may need to write the equal sign but with some add on above or below the parallel lines; to do so you need to load the amssymb package. You can see the generated symbols in the following example,<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\\documentclass{article}\n\\usepackage{amssymb}\n\\begin{document}\n\u00a0 \u00a0 Some variations can be \\\\\n\u00a0 \u00a0 - A dot above: $a \\doteq b$ \\\\\n\u00a0 \u00a0 - A triangle above: $a \\triangleq b$ \\\\\n\u00a0 \u00a0 - A circle above: $a \\circeq b$\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=\"468\" height=\"209\" src=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image5-1.png\" alt=\"Equal Or Not Equal Symbol In Latex : Variations for equality\" class=\"wp-image-4134\" srcset=\"https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image5-1.png 468w, https:\/\/www.scijournal.org\/articles\/wp-content\/uploads\/2022\/06\/image5-1-300x134.png 300w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><figcaption>Variations for equality<\/figcaption><\/figure><\/div>\n\n\n<p>Now you have the knowledge to write these useful and super common symbols in your documents with multiple methods and options. In case you wonder whether some variation of this symbol exists, look in the amssymb documentation or on the internet, don\u2019t be shy to ask.<\/p>\n\n\n\n<p>I hope this post was helpful, by writing you gain more confidence and get more experience, practice makes perfect. Keep writing in LaTeX and until next time.<\/p>\n\n\n\n<p><em>All images were created in LaTeX by the author.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Further Reading<\/strong><\/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\/dot-product-in-latex\">How to write a dot product 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\/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 the simplest and easiest way to write the equal or not equal symbol in LaTeX. A very common symbol used in mathematics and computer programming, with many more uses in spelling, linguistics and chemistry. Today you will learn how to insert it in your LaTeX document. Equal or not &#8230; <a title=\"How to write the equal or not equal symbol in LaTeX?\" class=\"read-more\" href=\"https:\/\/www.scijournal.org\/articles\/equal-or-not-equal-symbol-in-latex\" aria-label=\"Read more about How to write the equal or not equal symbol in LaTeX?\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":4128,"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":[],"_links":{"self":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/4127"}],"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=4127"}],"version-history":[{"count":2,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/4127\/revisions"}],"predecessor-version":[{"id":5628,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/posts\/4127\/revisions\/5628"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/media\/4128"}],"wp:attachment":[{"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/media?parent=4127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/categories?post=4127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scijournal.org\/articles\/wp-json\/wp\/v2\/tags?post=4127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}