<p>I think I found your misunderstanding, but it's IMHO based on a little inconsistency (or at least lack of clarity) in the book.</p>

<blockquote>
  <p>But, the θ is always zero vector because J+J=I, so θ=0z.</p>
</blockquote>

<p>This is not true, $J^+J$ is not necessarily $I$. $JJ^+=I$ but the <strong>multiplication by the pseudoinverse is <em>not</em> commutative</strong>. Let's look at this in more detail:</p>

<p>$JJ^+ = JJ^T(JJ^T)^{-1}= (JJ^T)(JJ^T)^{-1} = I$</p>

<p>$J^+J = J^T(JJ^T)^{-1}J = ?$</p>

<p>The underlying misunderstanding comes from the assumption that the matrices $J^T(JJ^T)^{-1}$ and $(J^TJ)^{-1}J^T$ are equal (since the latter <em>would</em> produce $I$ if right-multiplied by $J$), which is <em>not</em> true. They are <strong>both pseudoinverses of $J$ but they are not necessarily the same matrices</strong>, in fact they don't necessarily both <em>exist</em>.</p>

<p>As the book says, the $(JJ^T)^{-1}$ only exists if the <em>rows</em> of $J$ are linearly independent, and in turn <a href="https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse#Definition" rel="nofollow noreferrer">Wikipedia</a> says that $(J^TJ)^{-1}$ exists if the <em>columns</em> of $J$ are linearly independent. However, they can't both exist if the matrix is not square, since one of the dimensions would necessarily have more vectors than the dimension, which can't all be linearly independent. Specifically, for a normal redundant joint system you probably have <strong>more columns than rows, making only the pseudoinverse $J(JJ^T)^{-1}$ exist</strong>.</p>

<p>We can, however, see that for a square matrix they are indeed the same and actually the real inverse:</p>

<p>$J^T(JJ^T)^{-1} = J^TJ^{-T}J^{-1} = (J^{-1}J)^TJ^{-1} = I^TJ^{-1} = J^{-1}$</p>

<p>$(J^TJ)^{-1}J^T = J^{-1}J^{-T}J^T = J^{-1}(JJ^{-1})^T = J^{-1}I^T = J^{-1}$</p>

<p>(But in that case the system would have a unique solution and there's no point to angle control anyway.) But you cannot resolve the brackets with a non-square matrix, since the <strong>individual matrices aren't square and don't have an actual inverse</strong>. The only situation when <strong>both matrices <em>exist</em> are square $J$s</strong> and then they are indeed <strong>equal, but then there's also no point to angle control</strong>.</p>

<p>But I understand why you are confused and I am a little, too, since Parent actually seems to use the <em>alleged</em> identity $J^T(JJ^T)^{-1}=(J^TJ)^{-1}J^T$ in equation 5.20, where he derives the pseudoinverse's relevance for solving the inverse kinematics problem. He computes everything with the <em>left inverse</em> but than concludes with using the <em>right inverse</em>. I guess that works conceptually because they're both pseudoinverses, even if it doesn't make complete mathematical sense (to me and you at least). He seemed to have used the assumption of a square matrix as a trick for transforming the problem and then used the conclusion for a non-square matrix, which <em>might</em> be conceptually correct.</p>

<p>I guess it simply <strong>doesn't matter <em>which</em> of the two pseudoinverses we use, since only <em>one</em> of them ever exists</strong> (for a non-square Jacobian) anyway and if the left inverse <em>would</em> exist (making your above assumption true), that means you have more constraints than DoF and thus your system is overconstrained and there's no point in angle control.</p>

CC BY-SA 3.0
2017-10-02T11:57:02.027Z
2017-10-02T22:24:58.050Z
2017-10-02T22:24:58.050Z
Christian Rau
<p>I am studying inverse kinematics.
But I wonder the suggested equations.
(The following equations are taken from 'Computer Animation Algorithms and Techniques Third Edition Page, 181')</p>

<p>To better control the kinematic model such as encouraging joint angle constraints, a control expression can be added to the pesudoinverse Jacobian solution. </p>

<p>($J$ is Jacobian, $J^+ = J^T(JJ^T)^{-1} = (J^TJ)^{-1}J^T$, and I will explain $z$ later)</p>

<p>The form for <strong>the control expression</strong> is the below eqution 5.25</p>

<p>$ \theta = (J^+J - I)z\cdot\cdot\cdot\cdot(5.25) $</p>

<p>But, the $\theta$ is always zero vector because $J^+J = I$, so $\theta = \mathbf 0z$.</p>

<p>The book said that a change to pose parameters in the form of Equation 5.25 does not add anything to the velocities, so the control expression can be added to the pseudoinverse Jacobian solution without chaining the given velocities to be satisfied. </p>

<p>$ V = J\theta \\
V = J(J^+J - I)z \\
V = \mathbf0z \\
V = \mathbf0 \cdot\cdot\cdot\cdot(5.26)$</p>

<p>And the book defined $z$ (Equation (5.27)) to bias the solution toward specific joint angles.</p>

<p>$z = \alpha_i(\theta_i - \theta_{ci})^2\cdot\cdot\cdot\cdot(5.27)$ where $\theta_i$ is the current joint angles, $\theta_{ci}$ are the desired joint angles, and $\alpha_i$ is joint gains.</p>

<p>Finally, <strong>The form of the conventional pseudoinverse</strong> of the Jocobian added by <strong>the contorol expression</strong> is Equation 5.28.</p>

<p>$\theta = J^+V + (J^+J - I)z \cdot\cdot\cdot\cdot(5.28)\\
\theta = J^+(V + Jz) -z \\
\theta = J^T[(JJ^T)^{-1}(V+Jz)] -z
$</p>

<p>However, I could not understand why the book derived the above equation. Because the equation 5.25 is  zero vector, the equation 5.28 of red part($\theta = J^+V + \color{red}{(J^+J - I)z}$) is zero vector and $z$ doesn't have any effect on the result. We just have $\theta = J^+V$, no difference from the real original conventional pseudoinverse.</p>

<p>What is wrong with me?</p>

<animation><linear-algebra>
pseudoinverse Jacobian and adding more control in computer animation
shashack
# pseudoinverse Jacobian and adding more control in computer animation

(Asked by: username_0 on 2017-10-01)

I am studying inverse kinematics.
But I wonder the suggested equations.
(The following equations are taken from 'Computer Animation Algorithms and Techniques Third Edition Page, 181')

To better control the kinematic model such as encouraging joint angle constraints, a control expression can be added to the pesudoinverse Jacobian solution.

($J$ is Jacobian, $J^+ = J^T(JJ^T)^{-1} = (J^TJ)^{-1}J^T$, and I will explain $z$ later)

The form for **the control expression** is the below eqution 5.25

$ \theta = (J^+J - I)z\cdot\cdot\cdot\cdot(5.25) $

But, the $\theta$ is always zero vector because $J^+J = I$, so $\theta = \mathbf 0z$.

The book said that a change to pose parameters in the form of Equation 5.25 does not add anything to the velocities, so the control expression can be added to the pseudoinverse Jacobian solution without chaining the given velocities to be satisfied.

$ V = J\theta \\
V = J(J^+J - I)z \\
V = \mathbf0z \\
V = \mathbf0 \cdot\cdot\cdot\cdot(5.26)$

And the book defined $z$ (Equation (5.27)) to bias the solution toward specific joint angles.

$z = \alpha\_i(\theta\_i - \theta\_{ci})^2\cdot\cdot\cdot\cdot(5.27)$ where $\theta\_i$ is the current joint angles, $\theta\_{ci}$ are the desired joint angles, and $\alpha\_i$ is joint gains.

Finally, **The form of the conventional pseudoinverse** of the Jocobian added by **the contorol expression** is Equation 5.28.

$\theta = J^+V + (J^+J - I)z \cdot\cdot\cdot\cdot(5.28)\\
\theta = J^+(V + Jz) -z \\
\theta = J^T[(JJ^T)^{-1}(V+Jz)] -z
$

However, I could not understand why the book derived the above equation. Because the equation 5.25 is zero vector, the equation 5.28 of red part($\theta = J^+V + \color{red}{(J^+J - I)z}$) is zero vector and $z$ doesn't have any effect on the result. We just have $\theta = J^+V$, no difference from the real original conventional pseudoinverse.

What is wrong with me?

**Tags:** animation, linear-algebra


---

## 1 answers

### Answer by username_1 on 2017-10-02. Score: 1 | Accepted answer

I think I found your misunderstanding, but it's IMHO based on a little inconsistency (or at least lack of clarity) in the book.

> But, the θ is always zero vector because J+J=I, so θ=0z.

This is not true, $J^+J$ is not necessarily $I$. $JJ^+=I$ but the **multiplication by the pseudoinverse is *not* commutative**. Let's look at this in more detail:

$JJ^+ = JJ^T(JJ^T)^{-1}= (JJ^T)(JJ^T)^{-1} = I$

$J^+J = J^T(JJ^T)^{-1}J = ?$

The underlying misunderstanding comes from the assumption that the matrices $J^T(JJ^T)^{-1}$ and $(J^TJ)^{-1}J^T$ are equal (since the latter *would* produce $I$ if right-multiplied by $J$), which is *not* true. They are **both pseudoinverses of $J$ but they are not necessarily the same matrices**, in fact they don't necessarily both *exist*.

As the book says, the $(JJ^T)^{-1}$ only exists if the *rows* of $J$ are linearly independent, and in turn [Wikipedia](https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse#Definition) says that $(J^TJ)^{-1}$ exists if the *columns* of $J$ are linearly independent. However, they can't both exist if the matrix is not square, since one of the dimensions would necessarily have more vectors than the dimension, which can't all be linearly independent. Specifically, for a normal redundant joint system you probably have **more columns than rows, making only the pseudoinverse $J(JJ^T)^{-1}$ exist**.

We can, however, see that for a square matrix they are indeed the same and actually the real inverse:

$J^T(JJ^T)^{-1} = J^TJ^{-T}J^{-1} = (J^{-1}J)^TJ^{-1} = I^TJ^{-1} = J^{-1}$

$(J^TJ)^{-1}J^T = J^{-1}J^{-T}J^T = J^{-1}(JJ^{-1})^T = J^{-1}I^T = J^{-1}$

(But in that case the system would have a unique solution and there's no point to angle control anyway.) But you cannot resolve the brackets with a non-square matrix, since the **individual matrices aren't square and don't have an actual inverse**. The only situation when **both matrices *exist* are square $J$s** and then they are indeed **equal, but then there's also no point to angle control**.

But I understand why you are confused and I am a little, too, since Parent actually seems to use the *alleged* identity $J^T(JJ^T)^{-1}=(J^TJ)^{-1}J^T$ in equation 5.20, where he derives the pseudoinverse's relevance for solving the inverse kinematics problem. He computes everything with the *left inverse* but than concludes with using the *right inverse*. I guess that works conceptually because they're both pseudoinverses, even if it doesn't make complete mathematical sense (to me and you at least). He seemed to have used the assumption of a square matrix as a trick for transforming the problem and then used the conclusion for a non-square matrix, which *might* be conceptually correct.

I guess it simply **doesn't matter *which* of the two pseudoinverses we use, since only *one* of them ever exists** (for a non-square Jacobian) anyway and if the left inverse *would* exist (making your above assumption true), that means you have more constraints than DoF and thus your system is overconstrained and there's no point in angle control.


---

