# Why no \`sin(x::Eigen)\`?

**URL:** <https://discourse.julialang.org/t/why-no-sin-x-eigen/95492>\
**Category:** Internals & Design\
**Tags:** linearalgebra\
**Created:** [March 3, 2023, 11:59am UTC](https://discourse.julialang.org/t/why-no-sin-x-eigen/95492 "2023-03-03T11:59:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlbosse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlbosse/32/11274_2.png) [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Post date:** [March 3, 2023, 11:59am UTC](https://discourse.julialang.org/t/why-no-sin-x-eigen/95492/1 "2023-03-03T11:59:53Z")

</div>

I noticed that `LinearAlgebra` defines `inv(A::Eigen)`, but only few other functions that that accept `Eigen` as inputs. It seems like it would be easy and sensible enough to define

```julia
for f in (:exp, :cis, :log, :sqrt,
          :cos, :sin, :tan, :csc, :sec, :cot,
          :cosh, :sinh, :tanh, :csch, :sech, :coth,
          :acos, :asin, :atan, :acsc, :asec, :acot,
          :acosh, :asinh, :atanh, :acsch, :asech, :acoth)
    @eval function $f(A::Eigen)
        A.vectors * $f(Diagonal(A.values)) / A.vectors
    end
end

```

to get all these functions supported for `Eigen` objects too. Is there a good reason this is not in `Base`?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [March 3, 2023, 12:04pm UTC](https://discourse.julialang.org/t/why-no-sin-x-eigen/95492/2 "2023-03-03T12:04:29Z")

</div>

There is an open PR to add that (and various other matrix functions): [JuliaLang/julia#48549](https://github.com/JuliaLang/julia/pull/48549).

---

<div class="post-metadata">

**Author:** ![jlbosse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlbosse/32/11274_2.png) [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Post date:** [March 3, 2023, 12:06pm UTC](https://discourse.julialang.org/t/why-no-sin-x-eigen/95492/3 "2023-03-03T12:06:32Z")

</div>

Fantastic, I will show my support for it then!
