```python
import heapq

def k_smallest_pairs(nums1, nums2, k):
    if not nums1 or not nums2 or k <= 0:
        return []

    min_heap = []
    result_pairs = []

    # Initialize the heap with pairs formed by the first element of nums2
    # and the first k elements of nums1. This is because the smallest sums
    # must involve the smallest elements from both arrays.
    for i in range(min(len(nums1), k)):
        # The heap stores tuples of (sum, index_in_nums1, index_in_nums2)
        current_sum = nums1[i] + nums2[0]
        heapq.heappush(min_heap, (current_sum, i, 0))

    # Extract the k smallest pairs from the heap.
    while min_heap and len(result_pairs) < k:
        # Pop the pair with the overall smallest sum from the heap.
        _, index1, index2 = heapq.heappop(min_heap)
        
        # Add this pair to our results.
        result_pairs.append([nums1[index1], nums2[index2]])
        
        # If there is a next element in nums2 for the current element from nums1,
        # add the new pair to the heap. This explores the next smallest potential
        # pair from the same "row" (fixed nums1 element).
        next_index2 = index2 + 1
        if next_index2 < len(nums2):
            next_sum = nums1[index1] + nums2[next_index2]
            heapq.heappush(min_heap, (next_sum, index1, next_index2))
            
    return result_pairs
```