Skip to content

Commit 0f09df4

Browse files
committed
doc: Expand on orthogonality properties of the cross product (bug #67186).
* cross.m: Expand documentation on orthogonality properties of the cross product in case of complex output.
1 parent 9c65a1c commit 0f09df4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

scripts/linear-algebra/cross.m

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,23 @@
3232
## If @var{x} and @var{y} are arrays, the cross product is applied along the
3333
## first dimension with three elements.
3434
##
35-
## The optional argument @var{dim} forces the cross product to be calculated
35+
## The optional argument @var{dim} forces the cross product to be calculated
3636
## along the specified dimension. An error will be produced if the specified
3737
## dimension is not three elements in size.
3838
##
39+
## In the case of a complex output, orthogonality of the output with respect
40+
## to the inputs is also satisfied, and the condition
41+
## @example
42+
## @code{dot (conj (@var{z}), @var{x}) @equiv{} dot (conj (@var{z}), @var{y}) = 0}
43+
## @end example
44+
## is met. @code{dot (@var{z}, @var{x}) = 0} and
45+
## @code{dot (@var{z}, @var{y}) = 0} will not hold. Also note that instead of
46+
## using the @code{dot} function, the inner product
47+
## @example
48+
## @code{@var{z}(:).' * @var{x}(:) @equiv{} @var{z}(:).' * @var{y}(:) = 0}
49+
## @end example
50+
## will meet the orthogonality condition for vector input.
51+
##
3952
## Example Code:
4053
##
4154
## @example
@@ -56,7 +69,7 @@
5669
## @end group
5770
## @end example
5871
##
59-
## @seealso{dot, curl, divergence}
72+
## @seealso{dot, curl, divergence, conj}
6073
## @end deftypefn
6174

6275
function z = cross (x, y, dim)

0 commit comments

Comments
 (0)