# Dot product between arrays: basis representation of an image

1. Oct 10, 2012

### fisico30

Hello Forum,

When we represent a vector X using an orthonormal basis, we express X as a linear combination of the basis vectors:

x= a1 v1 + a2 v2 + a3 v3+ .....

Each coefficient a_i is the dot product between x and each basis vector v_i.

If the vector x is not a row (or column vector), but an array (like an image) the equation is still the same: the a_i are single numbers, while the basis vectors v_i become arrays. The array x becomes the weighted sum of multiple basis arrays.

But how does the dot product between two matrices, x and v1 for example, both of size NxN, give a single number, the coefficient a1? The dimension does not seem to allow this matrix product to output a 1x1 vector (the single coefficient), does it?

a1=<x^T, v1>= dot product between the transpose of x and array v1....

thanks
fisico30

2. Oct 10, 2012

### HallsofIvy

Staff Emeritus
In order to define a dot product between vectors in a given basis you have to first define the dot product of the basis vectors.

How are you defining the "dot product" of the arrays you are using as basis vectors?

3. Oct 10, 2012

### fisico30

Well,
I am thinking of an image, say 10x10 in size as being equal to the weighted sum of 2D Fourier components:

G = a1 Phi1+ a2 Phi2+ a3 Phi3+...

where Phi_i are the two dimensional sinusoidal signals (basis functions of the Fourier transform): Phi_i= a_i *exp [i*(kx*x+ky*y)] of size 10x10.
The Fourier basis can be made orthonormal.

I would imaging a dot product between the image G and each Phi_i to produce the single number a_i....

fisico30