# MethodError: no method matching\*Vector{Float64}

**URL:** <https://discourse.julialang.org/t/methoderror-no-method-matching-vector-float64/96720>\
**Category:** New to Julia\
**Tags:** error\
**Created:** [March 28, 2023, 3:46pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-vector-float64/96720 "2023-03-28T15:46:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [March 28, 2023, 6:15pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-vector-float64/96720/6 "2023-03-28T18:15:39Z")

</div>

Use `.` whenever you want the operation performed element-by-element. This is called [broadcasting](https://docs.julialang.org/en/v1/manual/arrays/#Broadcasting) and Julia forces you to be explicit about when you want that behavior.

There is [a macro available](https://docs.julialang.org/en/v1/base/arrays/#Base.Broadcast.@ __dot__ ) to make this a little more convenient in case you have many broadcasting operations in one line: `2 .* x .* y == @. 2 * x * y`.

See more detailed explanations here:

> [@Understand vectorized dot operators](https://discourse.julialang.org/t/understand-vectorized-dot-operators/96388):
>
> Dear folks I’m an old Matlab user who is trying to switch to Julia. In Matlab, I use array (element-wise) arithmetic a lot. When I tried to make element-wise arithmetic using Julia, I noticed the following strange behavior: Adding a scalar to a vector needs dot “.+”, while multiplying them works fine without the dot!!! Multiplying two vectors needs dot “.\*”, while adding them works fine without the dot!!! I got confused!! Please help me understand when I need the dot and when I don’t need i…

---

_[View the full topic](https://discourse.julialang.org/t/methoderror-no-method-matching-vector-float64/96720)._
