# Transpose of a sparse matrix is not a sparse matrix?

**URL:** <https://discourse.julialang.org/t/transpose-of-a-sparse-matrix-is-not-a-sparse-matrix/30638>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 3, 2019, 12:02am UTC](https://discourse.julialang.org/t/transpose-of-a-sparse-matrix-is-not-a-sparse-matrix/30638 "2019-11-03T00:02:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmouts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gmouts/32/9896_2.png) [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Post date:** [November 3, 2019, 12:02am UTC](https://discourse.julialang.org/t/transpose-of-a-sparse-matrix-is-not-a-sparse-matrix/30638/1 "2019-11-03T00:02:24Z")

</div>

I don’t understand what is happening here:

```julia
julia> transpose(sparse(Matrix(1I, 5, 5)))
5×5 Transpose{Int64,SparseMatrixCSC{Int64,Int64}}:
 1 0 0 0 0
 0 1 0 0 0
 0 0 1 0 0
 0 0 0 1 0
 0 0 0 0 1

```

What is the type `Transpose{Int64,SparseMatrixCSC{Int64,Int64}}`? Why the transpose of `SparseMatrixCSC{Int64,Int64}` is not of the same type?

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [November 3, 2019, 1:09am UTC](https://discourse.julialang.org/t/transpose-of-a-sparse-matrix-is-not-a-sparse-matrix/30638/2 "2019-11-03T01:09:10Z")

</div>

The Transpose is a wrapper that avoids copying any data. It behaves like the original matrix transposed. The same will happen if you transpose a normal array, or any other array for that matter.
