Defined by Function

To use the Defined by Function option, first define a function f (i, j) of two variables. Then use Defined by Function to create the m×n matrix with (i, j) entry equal to f (i, j) for 1≤im and 1≤jn.


\begin{example}
\textsl{Hilbert matrices}
\par
Define $f(i,j)=%
\frac{1}{i+j-1...
...rac{1}{4} & \frac{1}{5}
\end{array}
\right]
\end{displaymath}
\end{example}


\begin{example}
\textsl{Vandermonde matrix}
\par
Define the function $g(i,j)=x_...
...& x_{4}^{2} & x_{4}^{3}
\end{array}
\right]
\end{displaymath}
\end{example}

You can use Fill Matrix to create a general matrix with entries such as ai, j.


\begin{example}
\textsl{An \lq\lq arbitrary'' }$3\times 3$\textsl{\ matrix}
\par
Def...
...,1} & a_{3,2} & a_{3,3}
\end{array}
\right]
\end{displaymath}
\end{example}

Note the comma between subscripts. Without the comma, the subscript ij would be interpreted as a product! You can use the following trick to create a general matrix up to 9×9 with no commas in the subscripts.


\begin{example}
\textsl{Another form for an \lq\lq arbitrary'' }$3\times 3$\textsl{\...
..._{31} & a_{32} & a_{33}
\end{array}
\right]
\end{displaymath}
\end{example}


\begin{example}
\textsl{Constant matrices}
\par
From the \textsf{Fill Matrix} d...
...}{cc}
5 & 5 \\
5 & 5
\end{array}
\right]
\end{displaymath}
\end{example}