# Matrix multiplication and vector multiplication give different results!

**URL:** <https://discourse.julialang.org/t/matrix-multiplication-and-vector-multiplication-give-different-results/130177>\
**Category:** Numerics\
**Created:** [June 24, 2025, 4:27pm UTC](https://discourse.julialang.org/t/matrix-multiplication-and-vector-multiplication-give-different-results/130177 "2025-06-24T16:27:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [June 24, 2025, 4:55pm UTC](https://discourse.julialang.org/t/matrix-multiplication-and-vector-multiplication-give-different-results/130177/2 "2025-06-24T16:55:15Z")

</div>

> [@PSA: floating-point arithmetic](https://discourse.julialang.org/t/psa-floating-point-arithmetic/8678):
>
> Sometimes people are surprised by the results of floating-point calculations such as julia\> 5/6 0.8333333333333334 # shouldn't the last digit be 3? julia\> 2.6 - 0.7 - 1.9 2.220446049250313e-16 # shouldn't the answer be 0? These are not bugs in Julia. They’re consequences of the IEEE-standard 64-bit binary representation of floating-point numbers that is burned into computer hardware, which Julia and many other languages use by default. Brief explanation You can t…

---

_[View the full topic](https://discourse.julialang.org/t/matrix-multiplication-and-vector-multiplication-give-different-results/130177)._
