# Using PCoA versus PCA

**URL:** <https://forum.qiime2.org/t/using-pcoa-versus-pca/26019>\
**Category:** General Discussion\
**Created:** [April 4, 2023, 8:15pm UTC](https://forum.qiime2.org/t/using-pcoa-versus-pca/26019 "2023-04-04T20:15:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jwdebelius](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jwdebelius/32/9655_2.png) [@jwdebelius](https://forum.qiime2.org/u/jwdebelius)\
**Post date:** [April 5, 2023, 2:14pm UTC](https://forum.qiime2.org/t/using-pcoa-versus-pca/26019/3 "2023-04-05T14:14:22Z")

</div>

Hi @Emily_Yu,

Welcome to the :qiime2: forum!

I think the classic source from this is [Numerical Ecology](https://www.google.com/books/edition/Numerical_Ecology/DKlUIQcHhOsC?hl=en&gbpv=0) by Legrande and Legrande. I think it's like chapter 9, but I'm not sure off the top of my head. I just went hunting for GustaMe, which is another _excellent_ resource, but doesn't seem to be online right now.

There are two terms that we use which are _very_ similar:

- Principal **Components** Analysis - PCA
- Principal **Coordinates** Analysis - PC **o** A

From a general perspective, you can think of PCA as a special case of PCoA, although the steps are a little different.

In Principal **Components** Analysis, we:

1. Start with a table of features (or transformed table)
2. Calculate the **euclidean** distance between the features (for those paying attention, Aitchison = euclidean distance on CLR-transformed data)
3. Use an eigenvalue based ordination to project the distances into lower dimension space (this is a lot of linear algebra that's slightly over my head, TBH)
4. Use the known transform to place the features intot he same space (optional)
5. Show off your shiny new PCA and evaluate similiarity

In Principal **Coordinates** analyusis, we:

1. Start iwth a distance matrix. These can be _any_ distances you want (and occasionally a dissimilarity). Bray Curtis, unweighted UniFrac, Aitchison, Jensen-Shannon, it doesn't care. Got a metric that compares two samples on the basis of their favorite musical genre 🎵 ?
2. Use an eigenvalue based ordination to project the distances into low dimensional space
3. Show off your shiny new PCoA and evaluate similarity

There are a few points of comparison

| | PCA | PCoA |
| --- | --- | --- |
| Input | feature table | distance matrix |
| distance used | Euclidean **only** | any distance you want |
| clusters based on metadata | No | No |
| uses eigenvalues | Yes | Yes |
| can automagically map features into a biplot | Yes | No |

Best,  
Justine

---

_[View the full topic](https://forum.qiime2.org/t/using-pcoa-versus-pca/26019)._
