Scalar product of random unit vectors

Let $X,X’$ be two random vectors on the sphere $S^{d-1}$. What is the distribution of their dot product $Xcdot X’$ in the following cases:

  1. $X,X’$ independent with uniform distribution on the sphere $S^{d-1}$

  2. $Xin S^{d-1}$ deterministic, $X’$ uniformly distributed on $S^{d-1}$
    ?

Grade 12 Calculus and Vectors Math Problem

Question: A plane has -4y + 6z – 4 = 0 as its Cartesian equation. Determine the Cartesian equation of a plane that is perpendicular to and contain the point P(-3, -10, 4).

I tried doing this question on my own but I messed up and I don’t understand how I’m supposed to find the answer to this question. To solve the question, I tried to use the cross product but I got even more confused when doing it. Am I supposed to use the cross product? Or do I use another method? i would appreciate if anyone can help me out.

linear algebra – Help with vectors and matrices problem

I have a very specific question, hope someone can help me. We are given a matrix $A in mathbb{R}^{ntimes d}$. Suppose we have two collections of pairwise orthogonal unit vectors ${a_{1},…,a_{k}}$ and ${b_{1},…,b_{k}}$ such that $span({a_{1},…,a_{k}})=span({b_{1},…,b_{k}})$. Show that:
$$sum_{i=1}^k||A_{a_{i}}||^2=sum_{i=1}^k||A_{b_{i}}||^2$$
I have really no idea how to answer this, any help is accepted.

geometry – How to get the left and right rotation quaternions between two $mathbb{R}^4$ unit vectors?

This question is somewhat similar to this, but in higher dimension.

I have two non-collinear unit vectors in $mathbb{R}^4$, $bf a$ and $bf b$. I know from Wikipedia that there is at least one pair of quaternions $Q_L$ and $Q_R$ that is able to rotate $bf a$ to $bf b$, i.e.:
$$
{bf b} = Q_L {bf a} Q_R
$$

(where multiplication is the Hamilton product)

Questions:

  1. What is an easy to understand and fast to compute way to find $Q_L$ and $Q_R$?
  2. What are the rotation quaternions that moves $bf a$ towards $bf b$, but by a given angle $theta$ ?

Missing Ypub test vectors for the main network

Following the extended key derivation scheme in BIP49, is there a publicly available test vector repository for the main network? The test vectors in https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki#test-vectors are for testnet only.

Linear algebra – How many planes can two three-dimensional vectors fill in three-dimensional space?

In "Introduction to linear algebra", G. Strang gives an example of two 3d vectors (say v = (1,0,0) and w = (0,2,3)) and says that

CV + dw combinations fill a plane in R3.

I have read that 3D space has several planes. Hence the question: can there be only one plane that these combinations fill or is it possible that these linear combinations of two 3D vectors fill several planes in 3D?

xss – Possible attack vectors for a website scraper

I wrote a small utility which, given a website address, will search for metadata on the site. My ultimate goal here is to use it in a website that allows users to enter a site, then this utility goes and gets information: title, URL and description.

I am specifically looking at certain tags in the HTML code and I am encoding the return data, so I think I will be safe from XSS attacks. However, I wonder if there are other attack vectors to which this leaves me open.

python – How to align a table whose elements are vectors of different sizes

It is possible, in python, to format an output in the type console

         Peso (itens)
Item 1   1 (  )    1 ( 1 )    1 ( 1 )    1 ( 1 )    1 ( 1 ) 
Item 2   1 ( 1 )    2 ( 2 )    4 ( 1 2 )    4 ( 1 2 )    4 ( 1 2 3 )
Item 3   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 1 3 )
Item 4   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 1 3 )
Item 5   1 ( 1 )    2 ( 2 )    4 ( 3 )    8 ( 1 3 )    16 ( 5 ) 

so that the elements of the array are dynamically aligned according to the size of the vector in parentheses (the values ​​in parentheses can vary in size, with 0 elements, 1 element, 2 elements, etc.)

Here is an example of alignment that I would like:

         Peso (itens)         
Item 1   1 (   )    1 ( 1 )    1 ( 1 )      1 ( 1 )      1  ( 1 )
Item 2   1 ( 1 )    2 ( 2 )    4 ( 1 2 )    4 ( 1 2 )    4  ( 1 2 3 )
Item 3   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 1 3 )
Item 4   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 1 3 )
Item 5   1 ( 1 )    2 ( 2 )    4 ( 3 )      8 ( 1 3 )    16 ( 5 )

Why doesn't the OpenGL Modelview matrix have precisely signed vector values ​​for search vectors?

When I make a GluLookAt (0.0, 500.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0) so that I am at 500 units on the positive Y axis when looking at the origin with the upper vector of the camera pointing to the negative Z axis, this means that my unit vector, mathematically speaking, should be (0,0, -1.0, 0.0) correct? If I now look towards the negative Y axis and want to get closer to the origin, I am supposed to subtract the number of units from my camera's current position by 500 so that the value Y decreases, which means I'm moving the camera forward in the direction I'm pointing. How is it that when I do a glGetFloatv (GL_MODELVIEW_MATRIX, mycopy) to get the current matrix right after executing the GluLookAt command, I end up getting a look vector of (0,0, 1.0, 0.0) so that it is a positive Y value? mycopy (2), mycopy (6) and mycopy (10) are the values ​​of the look vector. I know I can deny it to get the negative Y value, but it seems like a cheap move. Why is OpenGL doing this in the modelview matrix when REAL math indicates that it should be a negative Y value for the look vector? If anyone can help me understand this, I would greatly appreciate it. 🙂

Linear algebra – Proof that the angle between the vectors is equal

I have this question said to prove that the angle between these three vectors are equal:

A = (3, -1,2) B = (-1, -1, -2) C = (3.3, -2)

I solved it by cos0 = a.b / | a || b | and the answers don't match and I asked my teacher about it, he says it's a little clever Q and I have to try another way can you help me with that? Or give me this "other way"? 😅