<divclass="platform-hinted "data-platform-hinted="data-platform-hinted"><divclass="content sourceset-dependent-content"data-active=""data-togglable=":kmath-tensors:dokkaHtmlPartial/commonMain"><divclass="symbol monospace"><spanclass="token keyword">abstract </span><spanclass="token keyword">infix </span><spanclass="token keyword">fun </span><ahref="../../../kmath-core/space.kscience.kmath.nd/-structure-n-d/index.html">StructureND</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="token punctuation">.</span><ahref="dot.html"><spanclass="token function">dot</span></a><spanclass="token punctuation">(</span><spanclass="parameters "><spanclass="parameter ">other<spanclass="token operator">: </span><ahref="../../../kmath-core/space.kscience.kmath.nd/-structure-n-d/index.html">StructureND</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span></span></span><spanclass="token punctuation">)</span><spanclass="token operator">: </span><ahref="../index.html#-1680022905%2FClasslikes%2F-1345790395">Tensor</a><spanclass="token operator"><</span><spanclass="token keyword"></span><ahref="index.html">T</a><spanclass="token operator">></span><spanclass="clearfix"><spanclass="floating-right">(<ahref="https://github.com/SciProgCentre/kmath/tree/master/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/api/TensorAlgebra.kt#L228">source</a>)</span></span></div><pclass="paragraph">Matrix product of two tensors.</p><pclass="paragraph">The behavior depends on the dimensionality of the tensors as follows:</p><ol><li><pclass="paragraph">If both tensors are 1-dimensional, the dot product (scalar) is returned.</p></li><li><pclass="paragraph">If both arguments are 2-dimensional, the matrix-matrix product is returned.</p></li><li><pclass="paragraph">If the first argument is 1-dimensional and the second argument is 2-dimensional, a 1 is prepended to its dimension for the purpose of the matrix multiply. After the matrix multiply, depending on the implementation the prepended dimension might be removed.</p></li><li><pclass="paragraph">If the first argument is 2-dimensional and the second argument is 1-dimensional, the matrix-vector product is returned.</p></li></ol><pclass="paragraph">Otherwise, throw an exception.</p><spanclass="kdoc-tag"><h4class="">Return</h4><pclass="paragraph">a mathematical product of two tensors.</p></span><h4class="">Parameters</h4><divclass="table"><divclass="table-row"data-filterable-current=":kmath-tensors:dokkaHtmlPartial/commonMain"data-filterable-set=":kmath-tensors:dokkaHtmlPartial/commonMain"><divclass="main-subrow keyValue "><divclass=""><spanclass="inline-flex"><div><u><span><span>other</span></span></u></div></span></div><div><divclass="title"><pclass="paragraph">tensor to be multiplied.</p></div></div></div></div></div></div></div>