# Adjoint of Matrix is not a StridedArray?

**URL:** <https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038>\
**Category:** Internals & Design\
**Created:** [July 14, 2020, 11:57am UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038 "2020-07-14T11:57:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SEA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sea/32/8956_2.png) [@SEA](https://discourse.julialang.org/u/SEA)\
**Post date:** [July 14, 2020, 11:57am UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038/1 "2020-07-14T11:57:41Z")

</div>

I am implementing a linear algebra routine for which I am trying to reuse an allocated array, but need to reshape it and take transposes of it.

In this process, I noticed that no method exists for `ldiv!(::LU, Adjoint{Float64, Matrix{Float64}})`, because `Adjoint{Float64, Matrix{Float64}}}` is not a subtype of `StridedArray`. But in reality, shouldn’t it be?

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [July 14, 2020, 2:01pm UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038/2 "2020-07-14T14:01:08Z")

</div>

The whole builtin strided interface is pretty anemic at the moment — `StridedArray` is just an ad-hoc union of some builtin types that happen to use strided layouts. Now as of Julia 1.5, Adjoints and Transposes gain support for calling `strides` and `pointer`, but they’re still not a part of that Union.

This could definitely be done better — see [#30432](https://github.com/JuliaLang/julia/pull/30432) or [#25558](https://github.com/JuliaLang/julia/pull/25558), for example.

---

<div class="post-metadata">

**Author:** ![juthohaegeman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juthohaegeman/32/8620_2.png) [@juthohaegeman](https://discourse.julialang.org/u/juthohaegeman)\
**Post date:** [July 14, 2020, 2:45pm UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038/3 "2020-07-14T14:45:26Z")

</div>

I guess that for many BLAS/Lapack routines, “strided” also means stride 1 along the first dimension. That fails for transpose and adjoint matrices.

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [July 17, 2020, 11:06pm UTC](https://discourse.julialang.org/t/adjoint-of-matrix-is-not-a-stridedarray/43038/4 "2020-07-17T23:06:02Z")

</div>

While the latter PR didn’t quite make it to Julia v1.0, but became ArrayLayouts.jl which has been fairly successful as a way to manipulate arrays based on layout, not type (and is used in BandedMatrices.jl, BlockArrays.jl, and elsewhere)
