# Function for Triangular Matrix multiplication

**URL:** <https://discuss.ai.google.dev/t/function-for-triangular-matrix-multiplication/29646>\
**Category:** General Discussion\
**Tags:** help\_request\
**Created:** [February 3, 2022, 10:16am UTC](https://discuss.ai.google.dev/t/function-for-triangular-matrix-multiplication/29646 "2022-02-03T10:16:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varad\_Joshi](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/varad_joshi/32/10646_2.png) [@Varad\_Joshi](https://discuss.ai.google.dev/u/Varad_Joshi)\
**Post date:** [February 3, 2022, 10:16am UTC](https://discuss.ai.google.dev/t/function-for-triangular-matrix-multiplication/29646/1 "2022-02-03T10:16:47Z")

</div>

Is there any function in TensorFlow for multiplication of Triangular matrix? Since triangular matrix has many zero’s in it so in order to increase its efficiency, Is there any function that ignores the part which has zero’s and computes for the rest of the matrix ?

---

<div class="post-metadata">

**Author:** ![Renu\_Patel](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/renu_patel/32/8957_2.png) [@Renu\_Patel](https://discuss.ai.google.dev/u/Renu_Patel)\
**Post date:** [February 6, 2024, 9:02am UTC](https://discuss.ai.google.dev/t/function-for-triangular-matrix-multiplication/29646/3 "2024-02-06T09:02:28Z")

</div>

Hi @Varad_Joshi

Welcome to the TensorFlow Forum!

There is no specific function for Triangular matrix multiplication in TensorFlow. However, you can try using [tf.sparse.SparseTensor](https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor) to create matrix with zeros and later multiply those matrices using [tf.sparse.sparse\_dense\_matmul](https://www.tensorflow.org/api_docs/python/tf/sparse/sparse_dense_matmul) API.

Please refer to the attached links for more understanding in this. Thank you.
