# Unicode multiplication × and minus − signs could be recognized by Julia as the are by Google

**URL:** <https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955>\
**Category:** Internals & Design\
**Created:** [September 9, 2021, 8:10pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955 "2021-09-09T20:10:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![oviedorodolfo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oviedorodolfo/32/5314_2.png) [@oviedorodolfo](https://discourse.julialang.org/u/oviedorodolfo)\
**Post date:** [September 9, 2021, 8:10pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/1 "2021-09-09T20:10:12Z")

</div>

If there is no speed penalty or any other kind of penalty, it would be nice that Unicode characters × (00D7) and − (2212) be recognized by Julia as multiplication and minus operators as they are by Google.  
Sometimes I copy a formula written in a word processor to a piece of code or an arithmetic computation to Google. In the case of a code I have to replace the multiplication sign by an asterix.  
Finally, using the multiplication operator makes the code nicer.

---

<div class="post-metadata">

**Author:** ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Post date:** [September 9, 2021, 8:30pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/2 "2021-09-09T20:30:51Z")

</div>

`x × y` is already in use for `cross(x,y)` and `x − y` is the same as the standard `x - y` starting from `v1.7` !

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 9, 2021, 8:32pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/3 "2021-09-09T20:32:14Z")

</div>

The `×` is already exported by the `LinearAlgebra` stdlib and it means cross product as it does in most mathematical texts:

```julia
julia> using LinearAlgebra

julia> [1, 2, 3] × [3, 2, 1]
3-element Vector{Int64}:
 -4
  8
 -4

```

The unicode minus is already an alias for `-` in the upcoming Julia release.

---

<div class="post-metadata">

**Author:** ![oviedorodolfo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oviedorodolfo/32/5314_2.png) [@oviedorodolfo](https://discourse.julialang.org/u/oviedorodolfo)\
**Post date:** [September 9, 2021, 8:40pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/4 "2021-09-09T20:40:20Z")

</div>

Thanks for the replies!  
The dot operator is not recognized. Is there a reason for that?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 9, 2021, 8:41pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/5 "2021-09-09T20:41:52Z")

</div>

It’s exported by the `LinearAlgebra` stdlib like the `×` operator.

---

<div class="post-metadata">

**Author:** ![oviedorodolfo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oviedorodolfo/32/5314_2.png) [@oviedorodolfo](https://discourse.julialang.org/u/oviedorodolfo)\
**Post date:** [September 9, 2021, 9:18pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/6 "2021-09-09T21:18:09Z")

</div>

Using LinearAlgebra, a dot operator is equivalent to an Asterix. Why not without the LinearAlgebra standard library?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 9, 2021, 9:20pm UTC](https://discourse.julialang.org/t/unicode-multiplication-x-and-minus-signs-could-be-recognized-by-julia-as-the-are-by-google/67955/7 "2021-09-09T21:20:11Z")

</div>

They are not the same

```julia
julia> using LinearAlgebra

julia> x = rand(5); y = rand(5);

julia> x ⋅ y
0.9319630238212403

julia> x * y
ERROR: MethodError: no method matching *(::Vector{Float64}, ::Vector{Float64})

```
