# Difference between revisions of "Main Page"

## Introduction

Welcome to LibMIA.

LibMIA is a software library designed to make manipulation of multi-indexed arrays (MIAs) easy. Technical computing packages, such as MATLAB, GNU Octave, and SciPy, support matrix algebra, making code look remarkably similar to what a scientist or practitioner would write on paper. However, matrices are not well-suited to work with and operate on MIAs, such as those found in digital imagery. What's needed is a formalism and supporting software designed for MIAs.

## MIA Formalism

If you're familiar with Einstein notation, then you already know much of MIA formalism. The biggest difference is the use of only one index type. There are other important differences.

An inner product, $c$, between two arrays $a_{i}$ and $b_{i}$, each of dimension $n$, is the summation of the products of all corresponding elements:

\begin{align}  c=\sum_{i=1}^{n}a_{i}b_{i} \textrm{.}  \end{align} Index notation uses a repeated index to represent an inner product, where the dimensionality is understood from the context:

\begin{align}  c=a_{i}b_{i} \textrm{.}  \end{align} Index notation also provides a concise convention for outer products. An outer product, $c_{ij}$, of $a_{i}$ and $b_{j}$, with dimensions $\{m,n\}$, is defined as the ordered product of all possible combinations of elements within the two arrays.

\begin{align}  c_{ij}=\left( \begin{array}{cccc} a_{1}b_{1} & a_{1}b_{2} & \ldots & a_{1}b_{n} \\ a_{2}b_{1} & a_{2}b_{2} & \ldots & a_{2}b_{n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m}b_{1} & a_{m}b_{2} & \ldots & a_{m}b_{n} \\ \end{array} \right) \textrm{.}  \end{align} Index notation simply uses differing indices to represent an outer product, where again the dimensionality is understood from the context:

\begin{align}  c_{ij}=a_{i}b_{j} \textrm{.}  \end{align} MIA formalism supports another important product - the element-wise or inter product. Performed using two first-order MIAs, it is expressed using an underline:

\begin{align}  c_{i}=a_ib_i \textrm{.}  \end{align} With the inter product defined, an MIA product can consist of any combination of $N$-order inner, inter, and outer products. a_{ijkl}b_{i