What is the third coordinate in "Projective Transformation" of an image and how to build the matrix of the inverse transform?
You have to understand that projective transformation is not linear.
It's $(x,y) -&gt; (X(x, y)/Z(x,y) , Y(x, y)/Z(x,y))$, where X, Y, Z - linear functions.

$w$ and $w&#39;$ are essential here - they help represent this non-linear transformation as linear - matrix multiplication - and that way this linear representation is a homomorphism (preserve "chaining" of operations).$w$ for input image is usually taken as $1$;
You get $w&#39;$ from matrix multiplication ($w' = gx + hy + iw$ ) and the end result of transform is $(x&#39;/w&#39;, y&#39;/w&#39;)$

Generally speaking you can't just assign $i=1$, but due to homogeneity you can divide all the matrix by $i$ and get new matrix, representing the same transform with right-left element $1$

I would advise you to read some textbook on projective geometry for computer vision to better understand this subject. Those questions have some deep implications.