# Sparse(kroneckersum). sparse or not?

**URL:** <https://discourse.julialang.org/t/sparse-kroneckersum-sparse-or-not/109521>\
**Category:** General Usage\
**Tags:** question, sparse, matrices, sparsearrays\
**Created:** [January 31, 2024, 2:56pm UTC](https://discourse.julialang.org/t/sparse-kroneckersum-sparse-or-not/109521 "2024-01-31T14:56:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enlil50](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/enlil50/32/206539_2.png) [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Post date:** [January 31, 2024, 2:56pm UTC](https://discourse.julialang.org/t/sparse-kroneckersum-sparse-or-not/109521/1 "2024-01-31T14:56:53Z")

</div>

I wrote these two sparseArrays functions:

```julia
using SparseArrays
using LinearAlgebra
using Kronecker

Sz = [[0.5, 0] [0, -0.5]]

C = kroneckersum(Sz, Sz)
D = sparse(C)
display(issparse(D))
display(D)

E = kronecker(Sz, Sz)
F = sparse(E)
display(issparse(F))
display(F)

```

While both say that the last matrix created is sparse (I know that wrapping sparse() around those functions should avoid me to allocate the intermediate matrix, but i wanted to be sure), the second is printed with display() as the usual sparse matrix, while the first no. So I was wondering if they missed the display() of kroneckersum or if there was an issue internally.
