# \#identity

**URL:** https://discourse.julialang.org/tag/identity/1783.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Concatenate matrices without specifying the size of zero matrices](https://discourse.julialang.org/t/concatenate-matrices-without-specifying-the-size-of-zero-matrices/128681)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 2\
**Last updated:** [May 4, 2025, 7:37am UTC](https://discourse.julialang.org/t/concatenate-matrices-without-specifying-the-size-of-zero-matrices/128681 "2025-05-04T07:37:14Z")

</div>

I wonder if there is a way to concatenate matrices without the need to specifying the size of the zero portions. For square matrices, I have a clever idea as follows julia\> using LinearAlgebra julia\> A = rand(-9:9, 2,…
