Foundation of Image Processing-Inner Product and Dot Product

Source: Internet
Author: User
Tags scalar

Defined in mathematics, dotproduct (scalarproduct)Scalar Product, Point product, and point Multiplication) Is a binary operation that accepts two vectors on the real number R and returns a real number scalar. It is the standard inner product of Euclidean space. Two vectors A = [a1, a2 ,..., An] and B = [b1, b2 ,..., The dot product of BN] is defined as a · B = a1b1 + A2B2 + ...... + Anbn uses matrix multiplication and regards the (column) vector as the N × 1 matrix. The dot product can also be written as a · B = a ^ t * B, here a ^ t indicates the transpose of matrix.

Inner Product, also known as scalar product and Dot Product)
It is a vector operation, but the result is a certain number, not a vector.
Set vector A = [a1, a2,... an], B = [B1, B2. .. bn]
The Inner Product of vectors A and B is expressed:
A · B =A1 × B1 + A2 × B2 + ...... + An × bn 
A · B = | A | × | B | × cos θ
| A | = (A1 ^ 2 + A2 ^ 2 +... + an ^ 2) ^ (1/2 );
| B | = (b1 ^ 2 + B2 ^ 2 +... + BN ^ 2) ^ (1/2 ).
Where, | A | and | B | are the modulus of vectors A and B respectively, which are the angle between θ vectors A and B (θ ε [0, π]).
If B is a unit vector, that is, when | B | = 1, A · B = | A | × cos θ indicates the projection length of vector A in the B direction.
The same is true when vector A is a unit vector.
When vector A is perpendicular to vector B, A · B = 0.

Exmple:

  

Set ann = [AIJ] (1 <= I, j <= N), BNN = [bij] (1 <= I, j <= N );
The Inner Product of matrix A and B is c1n = [Σ (I = 1 to n summation) AIJ * bij] (where 1 <= I, j <= N ).
Note that c1n is a matrix of one row and n columns.
Examples of child matrices A and B are:
[1 2 3]
[4 5 6]
[7 8 9]
And
[9 8 7]
[6 5 4]
[3 2 1]
The inner product is:
[1*9 + 4*6 + 7*3 2*8 + 5*5 + 8*2 3*7 + 6*4 + 1*9] = [54 57 54]

Appendix:

Http://dec3.jlu.edu.cn/webcourse/t?22/teach/chapter5/5_1.htmjilin University

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.