# Triangular Matrix creation

**URL:** https://community.konduit.ai/t/triangular-matrix-creation/2888
**Category:** ND4J
**Created:** [November 23, 2023, 2:20pm UTC](https://community.konduit.ai/t/triangular-matrix-creation/2888 "2023-11-23T14:20:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![roboquant](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@roboquant](https://community.konduit.ai/u/roboquant)
#### Post date: [November 23, 2023, 2:20pm UTC](https://community.konduit.ai/t/triangular-matrix-creation/2888/1 "2023-11-23T14:20:08Z")

</div>

Is there an efficient way to create a lower or upper triangular matrix from a regular NxN dense matrix?

So half of the matrix below/above the diagonal are replaced with zero’s.
