# Understand vectorized dot operators

**URL:** <https://discourse.julialang.org/t/understand-vectorized-dot-operators/96388>\
**Category:** New to Julia\
**Tags:** broadcast, broadcasting\
**Created:** [March 21, 2023, 12:09pm UTC](https://discourse.julialang.org/t/understand-vectorized-dot-operators/96388 "2023-03-21T12:09:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [March 21, 2023, 2:10pm UTC](https://discourse.julialang.org/t/understand-vectorized-dot-operators/96388/7 "2023-03-21T14:10:48Z")

</div>

> [@nilshg](#):
>
> I thought that’s what my (and Steven’s) answer had done - when an operation is meaningfully defined mathematically it works, if it isn’t, it doesn’t.
> 
> As explained in the first link I shared, adding a scalar to a vector is not a well defined operation.

I wouldn’t phrase it this way. Julia’s `vector .+ scalar` is perfectly well defined and meaningful mathematically, and [symbols can mean whatever we want them to mean](https://commons.wikimedia.org/wiki/File:Humpty_Dumpty_Tenniel-When_I_use_a_word.png). It’s just not an operation of _linear algebra_, and Julia reserves `+` for the ordinary algebraic meaning.

Julia used to be more Matlab-like and supported implicit vectorization/broadcasting of many functions (e.g. `vector + scalar`, `sqrt(vector)`, and so forth). However, this was changed when we got the `f.(x)` “dot syntax” to broadcast any function, since it turns out that this gave us big advantages by being syntactically explicit, as explained in [this blog post](https://julialang.org/blog/2017/01/moredots/).

Interestingly, Julia originally had `vector + scalar`, then it was removed ([julia#5810](https://github.com/JuliaLang/julia/pull/5810)), then it was added back ([julia#7226](https://github.com/JuliaLang/julia/pull/7226)), and then finally it was removed again ([julia#22932](https://github.com/JuliaLang/julia/pull/22932)) once we had fusing `f.(x)` syntax for all functions. See the linked issues for long discussions of the pros/cons — this is not something we decided on a whim, but after extensive debate and trial-and-error.

See also [Idea Julia Lite or 'Juliette'? - #55 by stevengj](https://discourse.julialang.org/t/idea-julia-lite-or-juliette/34076/55)

---

_[View the full topic](https://discourse.julialang.org/t/understand-vectorized-dot-operators/96388)._
