# Question about computing the determinant of matrix of indeterminate variables

**URL:** https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818
**Category:** Numerics
**Created:** [March 31, 2020, 7:59pm UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818 "2020-03-31T19:59:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Yusen\_Liu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yusen_liu/32/13760_2.png) [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)
#### Post date: [March 31, 2020, 7:59pm UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818/1 "2020-03-31T19:59:00Z")

</div>

Hi all, I’ve been struggling with computing the determinant of the matrix of indeterminate variables.  
My code is as follows:

using TypedPolynomials  
using LinearAlgebra  
@polyvar p1 p2 p3 p4 p5 p6  
A = [p1 p2 p3]  
AT=transpose(A)  
det(AT\*A)

I don’t know if there’s a way to compute the determinant since the result always shows 0.

---

<div class="post-metadata">

### Author: ![saschatimme](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/saschatimme/32/10313_2.png) [@saschatimme](https://discourse.julialang.org/u/saschatimme)
#### Post date: [March 31, 2020, 8:22pm UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818/2 "2020-03-31T20:22:14Z")

</div>

You compute the determinant of a rank 1 matrix which is always 0 🙂

---

<div class="post-metadata">

### Author: ![Yusen\_Liu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yusen_liu/32/13760_2.png) [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)
#### Post date: [March 31, 2020, 8:33pm UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818/3 "2020-03-31T20:33:45Z")

</div>

Oh! Thanks!!

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [April 1, 2020, 5:33am UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818/4 "2020-04-01T05:33:15Z")

</div>

Welcome to this forum! Also, please quote your code.

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

---

<div class="post-metadata">

### Author: ![Yusen\_Liu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yusen_liu/32/13760_2.png) [@Yusen\_Liu](https://discourse.julialang.org/u/Yusen_Liu)
#### Post date: [April 6, 2020, 7:01am UTC](https://discourse.julialang.org/t/question-about-computing-the-determinant-of-matrix-of-indeterminate-variables/36818/5 "2020-04-06T07:01:45Z")

</div>

Thank you so much for reminding me of quoting the code.
