<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Direct prod of two arrays</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for direct.prod {matrixcalc}"><tr><td>direct.prod {matrixcalc}</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2> Direct prod of two arrays </h2>

<h3>Description</h3>

<p>This function computes the direct product of two arrays.  The arrays can be
numerical vectors or matrices.  The result is a matrix.
</p>


<h3>Usage</h3>

<pre>
direct.prod( x, y )
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p> a numeric matrix or vector </p>
</td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
<p> a numeric matrix or vector </p>
</td></tr>
</table>


<h3>Details</h3>

<p>If either <i>\bf{x}</i> or <i>\bf{y}</i> is a vector, it is converted to a matrix.
Suppose that <i>\bf{x}</i> is an <i>m \times n</i> matrix and <i>\bf{y}</i> is an <i> p \times q</i>
matrix. Then, the function returns the matrix <i>&le;ft[ {\begin{array}{*{20}{c}}
{{x_{1,1}}\;{\bf{y}}}&amp;{{x_{1,2}}\;{\bf{y}}}&amp; \cdots &amp;{{x_{1,n}}\;{\bf{y}}}\\
{{x_{2,1}}\;{\bf{y}}}&amp;{{x_{2,2}}\;{\bf{y}}}&amp; \cdots &amp;{{x_{2,n}}\;{\bf{y}}}\\
 \cdots &amp; \cdots &amp; \cdots &amp; \cdots \\
{{x_{m,1}}\;{\bf{y}}}&amp;{{x_{m,2}}\;{\bf{y}}}&amp; \cdots &amp;{{x_{m,n}}\;{\bf{y}}}
\end{array}} \right]</i>.
</p>


<h3>Value</h3>

<p>A numeric matrix.
</p>


<h3>Author(s)</h3>

<p> Frederick Novomestky <a href="mailto:fnovomes@poly.edu">fnovomes@poly.edu</a>, Kurt Hornik <a href="mailto:Kurt.Hornik@wu-wien.ac.at">Kurt.Hornik@wu-wien.ac.at</a> </p>


<h3>References</h3>

<p>Magnus, J. R. and H. Neudecker (1999) <em>Matrix Differential Calculus with Applications in Statistics and Econometrics</em>,
Second Edition, John Wiley.
</p>


<h3>Examples</h3>

<pre>
x &lt;- matrix( seq( 1, 4 ) )
y &lt;- matrix( seq( 5, 8 ) )
print( direct.prod( x, y ) )
</pre>

<hr /><div style="text-align: center;">[Package <em>matrixcalc</em> version 1.0-3 <a href="00Index.html">Index</a>]</div>
</body></html>
