# Gram–Schmidt process

**URL:** https://community.freefem.org/t/gram-schmidt-process/189
**Category:** General Discussion
**Created:** [December 3, 2019, 9:41am UTC](https://community.freefem.org/t/gram-schmidt-process/189 "2019-12-03T09:41:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![hraf5](https://avatars.discourse-cdn.com/v4/letter/h/8baadc/32.png) [@hraf5](https://community.freefem.org/u/hraf5)
#### Post date: [December 3, 2019, 9:41am UTC](https://community.freefem.org/t/gram-schmidt-process/189/1 "2019-12-03T09:41:39Z")

</div>

**Hello everybody,**

**I am trying to orthonormalize a basis using the Gram-Schmidt process. Is it possible with FreeFem ++?**

**Thank you.**

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [December 3, 2019, 10:45am UTC](https://community.freefem.org/t/gram-schmidt-process/189/2 "2019-12-03T10:45:01Z")

</div>

Yes, just do `for` loops with vectors of vectors `real[int][int]` or `complex[int][int]`.

---

<div class="post-metadata">

### Author: ![hraf5](https://avatars.discourse-cdn.com/v4/letter/h/8baadc/32.png) [@hraf5](https://community.freefem.org/u/hraf5)
#### Post date: [December 3, 2019, 11:42am UTC](https://community.freefem.org/t/gram-schmidt-process/189/3 "2019-12-03T11:42:23Z")

</div>

Thank you very much for you response.  
But, I hope to use a pre-programmed function in Freefem ++ if it exists.

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [December 3, 2019, 12:03pm UTC](https://community.freefem.org/t/gram-schmidt-process/189/4 "2019-12-03T12:03:06Z")

</div>

It doesn’t exist. Why would you need that?

---

<div class="post-metadata">

### Author: ![hraf5](https://avatars.discourse-cdn.com/v4/letter/h/8baadc/32.png) [@hraf5](https://community.freefem.org/u/hraf5)
#### Post date: [December 3, 2019, 1:03pm UTC](https://community.freefem.org/t/gram-schmidt-process/189/5 "2019-12-03T13:03:40Z")

</div>

Well, since there is no function in FreeFem ++ I will try to program it.

I need it to orthonormalize a matrix where the columns are the elements of a basis.
