\title	{Pseudo-inverse 2x2}
\language{en}
\author	{XIAO Gang}
\email	{xiao@unice.fr}
\format	{html}
\range  {-5..5}
\precision{10000}

\integer{range=20}
\integer{half=\range/2}
\integer{side=random(1,2)}
\integer{d1=random(-1,1)*random(1..8)}
\integer{d2=random(-1,1)*random(1..8)}
\integer{a11=2*randint(-\half..\half)+1}
\integer{a12=randint(-\range..\range)}
\integer{a21=2*randint(-\half..\half)}
\integer{a22=2*randint(-\half..\half)+1}
\matrix{B=\a11,\a12;\a21,\a22}
\matrix{inv=\side=1?pari(print([\a11/(\d1),\a12/(\d2);\a21/(\d1),\a22/(\d2)])):
	pari(print([\a11/(\d1),\a12/(\d1);\a21/(\d2),\a22/(\d2)]))}
\text{mult=\side=1?A*[\B]:[\B]*A}

\statement{We have a 2&times;2 matrix \A, with
<p><center>
 \(\mult = [\d1,0;0,\d2] )&nbsp;&nbsp;.
</center> <p>
Please find the inverse matrix of \A.
}
\answer	{A<sup>-1</sup>}{\inv}{type=matrix}

