# Matrix multiplication

**URL:** https://openfhe.discourse.group/t/matrix-multiplication/180
**Category:** Show & Tell
**Created:** [October 26, 2022, 4:02pm UTC](https://openfhe.discourse.group/t/matrix-multiplication/180 "2022-10-26T16:02:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![FMazzone](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/fmazzone/32/78_2.png) [@FMazzone](https://openfhe.discourse.group/u/FMazzone)
#### Post date: [October 26, 2022, 4:02pm UTC](https://openfhe.discourse.group/t/matrix-multiplication/180/1 "2022-10-26T16:02:54Z")

</div>

Hi all,

While waiting for the next OpenFHE release, I implemented some methods to perform inner product and vector-matrix multiplication using OpenFHE, such as column/row-based packing and alternate packing from POSEIDON (Sav et al.).

You can find the code/poc/draft here [GitHub - FedericoMazzone/openfhe-ml](https://github.com/FedericoMazzone/openfhe-ml)  
This is my first attempt at using OpenFHE (and actually C++), so be aware that the code is quite messy.

---

<div class="post-metadata">

### Author: ![FMazzone](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/fmazzone/32/78_2.png) [@FMazzone](https://openfhe.discourse.group/u/FMazzone)
#### Post date: [December 6, 2022, 1:46pm UTC](https://openfhe.discourse.group/t/matrix-multiplication/180/2 "2022-12-06T13:46:39Z")

</div>

For those interested, I’ve added:

- [an example of inference for a small NN model](https://github.com/FedericoMazzone/openfhe-ml/blob/main/src/ml_inference.cpp);
- [a proof of concept for BFV threshold boostrapping, Enc2Share, Share2Enc](https://github.com/FedericoMazzone/openfhe-ml/blob/main/src/threshold_bootstrap_BFV.cpp) (by Mouchet et al.).
